From eae4afae85022c834d58d34af209f1f5ba648b88 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 13 Sep 2023 11:21:14 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 3.0.0, Speakeay CLI 1.82.5 --- previous-versions/accounting/.gitattributes | 2 + previous-versions/accounting/README.md | 235 ++++++- previous-versions/accounting/RELEASES.md | 12 +- previous-versions/accounting/USAGE.md | 4 +- .../operations/createaccountresponse.md | 4 +- .../operations/createbankaccountresponse.md | 4 +- .../createbanktransactionsresponse.md | 4 +- .../createbillcreditnoteresponse.md | 4 +- .../operations/createbillpaymentresponse.md | 4 +- .../models/operations/createbillresponse.md | 4 +- .../operations/createcreditnoteresponse.md | 4 +- .../operations/createcustomerresponse.md | 4 +- .../operations/createdirectcostresponse.md | 4 +- .../operations/createdirectincomeresponse.md | 4 +- .../operations/createinvoiceresponse.md | 4 +- .../models/operations/createitemresponse.md | 4 +- .../operations/createjournalentryresponse.md | 4 +- .../operations/createjournalresponse.md | 4 +- .../operations/createpaymentresponse.md | 4 +- .../operations/createpurchaseorderresponse.md | 4 +- .../operations/createsupplierresponse.md | 4 +- .../operations/createtransferresponse.md | 4 +- .../operations/deletebillpaymentresponse.md | 4 +- .../models/operations/deletebillresponse.md | 4 +- .../operations/deleteinvoiceresponse.md | 4 +- .../operations/deletejournalentryresponse.md | 4 +- .../downloadbillattachmentresponse.md | 4 +- .../downloadcustomerattachmentresponse.md | 4 +- .../downloaddirectcostattachmentresponse.md | 4 +- .../downloaddirectincomeattachmentresponse.md | 4 +- .../downloadinvoiceattachmentresponse.md | 4 +- .../downloadsupplierattachmentresponse.md | 4 +- .../getaccount409applicationjson.md | 15 - .../models/operations/getaccountresponse.md | 15 +- ...getaccounttransaction409applicationjson.md | 15 - .../getaccounttransactionresponse.md | 15 +- .../getagedcreditorsreportresponse.md | 4 +- .../getageddebtorsreportresponse.md | 4 +- .../getbalancesheet409applicationjson.md | 15 - .../operations/getbalancesheetresponse.md | 15 +- .../getbankaccount409applicationjson.md | 15 - .../operations/getbankaccountresponse.md | 15 +- .../operations/getbill409applicationjson.md | 15 - .../operations/getbillattachmentresponse.md | 4 +- .../getbillcreditnote409applicationjson.md | 15 - .../operations/getbillcreditnoteresponse.md | 15 +- .../getbillpayments409applicationjson.md | 15 - .../operations/getbillpaymentsresponse.md | 15 +- .../docs/models/operations/getbillresponse.md | 15 +- .../getcashflowstatement409applicationjson.md | 15 - .../getcashflowstatementresponse.md | 15 +- .../getcompanyinfo409applicationjson.md | 15 - .../operations/getcompanyinforesponse.md | 15 +- .../getcreatebanktransactionsmodelresponse.md | 4 +- .../getcreatebillpaymentsmodelresponse.md | 4 +- .../getcreatechartofaccountsmodelresponse.md | 4 +- .../getcreatedirectcostsmodelresponse.md | 4 +- .../getcreatedirectincomesmodelresponse.md | 4 +- .../operations/getcreateitemsmodelresponse.md | 4 +- .../getcreatejournalentriesmodelresponse.md | 4 +- .../getcreatejournalsmodelresponse.md | 4 +- .../getcreatepaymentsmodelresponse.md | 4 +- .../getcreatetransfersmodelresponse.md | 4 +- ...etcreateupdatebankaccountsmodelresponse.md | 4 +- ...reateupdatebillcreditnotesmodelresponse.md | 4 +- .../getcreateupdatebillsmodelresponse.md | 4 +- ...getcreateupdatecreditnotesmodelresponse.md | 4 +- .../getcreateupdatecustomersmodelresponse.md | 4 +- .../getcreateupdateinvoicesmodelresponse.md | 4 +- ...createupdatepurchaseordersmodelresponse.md | 4 +- .../getcreateupdatesuppliersmodelresponse.md | 4 +- .../getcreditnote409applicationjson.md | 15 - .../operations/getcreditnoteresponse.md | 15 +- .../getcustomer409applicationjson.md | 15 - .../getcustomerattachmentresponse.md | 4 +- .../models/operations/getcustomerresponse.md | 15 +- .../getdirectcost409applicationjson.md | 15 - .../getdirectcostattachmentresponse.md | 4 +- .../operations/getdirectcostresponse.md | 15 +- .../getdirectincome409applicationjson.md | 15 - .../getdirectincomeattachmentresponse.md | 4 +- .../operations/getdirectincomeresponse.md | 15 +- .../getinvoice409applicationjson.md | 15 - .../getinvoiceattachmentresponse.md | 4 +- .../models/operations/getinvoiceresponse.md | 15 +- .../operations/getitem409applicationjson.md | 15 - .../docs/models/operations/getitemresponse.md | 15 +- .../getjournal409applicationjson.md | 15 - .../getjournalentry409applicationjson.md | 15 - .../operations/getjournalentryresponse.md | 15 +- .../models/operations/getjournalresponse.md | 15 +- .../getpayment409applicationjson.md | 15 - .../getpaymentmethod409applicationjson.md | 15 - .../operations/getpaymentmethodresponse.md | 15 +- .../models/operations/getpaymentresponse.md | 15 +- .../getprofitandloss409applicationjson.md | 15 - .../operations/getprofitandlossresponse.md | 15 +- .../getpurchaseorder409applicationjson.md | 15 - .../operations/getpurchaseorderresponse.md | 15 +- .../getsalesorder409applicationjson.md | 15 - .../operations/getsalesorderresponse.md | 15 +- .../getsupplier409applicationjson.md | 15 - .../getsupplierattachmentresponse.md | 4 +- .../models/operations/getsupplierresponse.md | 15 +- .../gettaxrate409applicationjson.md | 15 - .../models/operations/gettaxrateresponse.md | 15 +- .../gettrackingcategory409applicationjson.md | 15 - .../operations/gettrackingcategoryresponse.md | 15 +- .../gettransfer409applicationjson.md | 15 - .../models/operations/gettransferresponse.md | 15 +- .../listaccounts409applicationjson.md | 15 - .../models/operations/listaccountsresponse.md | 15 +- ...staccounttransactions409applicationjson.md | 15 - .../listaccounttransactionsresponse.md | 15 +- .../listbankaccounts409applicationjson.md | 15 - .../operations/listbankaccountsresponse.md | 15 +- ...nkaccounttransactions409applicationjson.md | 15 - .../listbankaccounttransactionsresponse.md | 15 +- .../operations/listbillattachmentsresponse.md | 4 +- .../listbillcreditnotes409applicationjson.md | 15 - .../operations/listbillcreditnotesresponse.md | 15 +- .../listbillpayments409applicationjson.md | 15 - .../operations/listbillpaymentsresponse.md | 15 +- .../operations/listbills409applicationjson.md | 15 - .../models/operations/listbillsresponse.md | 15 +- .../listcreditnotes409applicationjson.md | 15 - .../operations/listcreditnotesresponse.md | 15 +- .../listcustomerattachmentsresponse.md | 4 +- .../listcustomers409applicationjson.md | 15 - .../operations/listcustomersresponse.md | 15 +- .../listdirectcostattachmentsresponse.md | 4 +- .../listdirectcosts409applicationjson.md | 15 - .../operations/listdirectcostsresponse.md | 15 +- .../listdirectincomeattachmentsresponse.md | 4 +- .../listdirectincomes409applicationjson.md | 15 - .../operations/listdirectincomesresponse.md | 15 +- .../listinvoiceattachmentsresponse.md | 4 +- .../listinvoices409applicationjson.md | 15 - .../models/operations/listinvoicesresponse.md | 15 +- .../operations/listitems409applicationjson.md | 15 - .../models/operations/listitemsresponse.md | 15 +- .../listjournalentries409applicationjson.md | 15 - .../operations/listjournalentriesresponse.md | 15 +- .../listjournals409applicationjson.md | 15 - .../models/operations/listjournalsresponse.md | 15 +- .../listpaymentmethods409applicationjson.md | 15 - .../operations/listpaymentmethodsresponse.md | 15 +- .../listpayments409applicationjson.md | 15 - .../models/operations/listpaymentsresponse.md | 15 +- .../listpurchaseorders409applicationjson.md | 15 - .../operations/listpurchaseordersresponse.md | 15 +- .../listsalesorders409applicationjson.md | 15 - .../operations/listsalesordersresponse.md | 15 +- .../listsupplierattachmentsresponse.md | 4 +- .../listsuppliers409applicationjson.md | 15 - .../operations/listsuppliersresponse.md | 15 +- .../listtaxrates409applicationjson.md | 15 - .../models/operations/listtaxratesresponse.md | 15 +- ...isttrackingcategories409applicationjson.md | 15 - .../listtrackingcategoriesresponse.md | 15 +- .../listtransfers409applicationjson.md | 15 - .../operations/listtransfersresponse.md | 15 +- .../operations/refreshcompanyinforesponse.md | 4 +- .../operations/updatebankaccountresponse.md | 4 +- .../updatebillcreditnoteresponse.md | 4 +- .../models/operations/updatebillresponse.md | 4 +- .../operations/updatecreditnoteresponse.md | 4 +- .../operations/updatecustomerresponse.md | 4 +- .../operations/updateinvoiceresponse.md | 4 +- .../operations/updatepurchaseorderresponse.md | 4 +- .../operations/updatesupplierresponse.md | 4 +- .../uploadbillattachmentresponse.md | 4 +- .../uploadbillcreditnoteattachmentrequest.md | 11 + ...loadbillcreditnoteattachmentrequestbody.md | 9 + .../uploadbillcreditnoteattachmentresponse.md | 11 + .../uploaddirectcostattachmentresponse.md | 4 +- .../uploaddirectincomeattachmentresponse.md | 4 +- .../uploadinvoiceattachmentresponse.md | 4 +- .../uploadtransferattachmentrequest.md | 11 + .../uploadtransferattachmentrequestbody.md | 9 + .../uploadtransferattachmentresponse.md | 11 + .../accounting/docs/models/shared/account.md | 20 +- ...ddresstype.md => accountingaddresstype.md} | 2 +- ...ustomerref.md => accountingcustomerref.md} | 2 +- .../accounting/docs/models/shared/accounts.md | 2 - .../docs/models/shared/accounttransaction.md | 4 +- .../models/shared/accounttransactionline.md | 10 +- .../docs/models/shared/accounttransactions.md | 2 - .../docs/models/shared/addressesitems.md | 18 +- .../agedcreditoragedcurrencyoutstanding.md | 2 +- ...urrencyoutstandingagedoutstandingamount.md | 11 - ...ndingamountamountsoutstandingbydatatype.md | 9 - .../shared/agedcurrencyoutstandingitems.md | 2 +- ...dingamount.md => agedoutstandingamount.md} | 6 +- ...type.md => agedoutstandingamountdetail.md} | 4 +- .../docs/models/shared/attachmentsdataset.md | 2 - .../docs/models/shared/balancesheet.md | 2 +- .../docs/models/shared/bankaccount.md | 6 +- .../docs/models/shared/bankaccounts.md | 2 - .../docs/models/shared/banktransactions.md | 36 +- .../models/shared/banktransactionsresponse.md | 14 - .../banktransactionssourcemodifieddate.md | 34 + .../accounting/docs/models/shared/bill.md | 12 +- .../docs/models/shared/billcreditnote.md | 16 +- .../models/shared/billcreditnotelineitem.md | 16 +- .../shared/billcreditnotelineitemtracking.md | 14 +- .../docs/models/shared/billcreditnotes.md | 2 - .../accounting/docs/models/shared/billitem.md | 2 +- .../docs/models/shared/billlineitem.md | 16 +- .../docs/models/shared/billpayment.md | 8 +- .../shared/billpaymentallocationallocation.md | 4 +- .../docs/models/shared/billpaymentline.md | 2 +- .../docs/models/shared/billpaymentlinelink.md | 4 +- .../docs/models/shared/billpayments.md | 2 - .../accounting/docs/models/shared/bills.md | 2 - .../models/shared/billsupplementaldata.md | 2 +- .../docs/models/shared/billwithholdingtax.md | 2 +- .../docs/models/shared/companydataset.md | 2 +- .../shared/companydatasetaccountingaddress.md | 14 + .../models/shared/companydatasetaddresses.md | 14 - .../models/shared/createaccountresponse.md | 34 +- .../shared/createbankaccountresponse.md | 6 +- .../shared/createbankaccounttransaction.md | 4 +- .../shared/createbanktransactionsresponse.md | 6 +- .../shared/createbillcreditnoteresponse.md | 6 +- .../shared/createbillpaymentresponse.md | 6 +- .../docs/models/shared/createbillresponse.md | 6 +- .../models/shared/createcreditnoteresponse.md | 6 +- .../models/shared/createcustomerresponse.md | 6 +- .../models/shared/createdirectcostresponse.md | 34 +- .../shared/createdirectincomeresponse.md | 34 +- .../models/shared/createinvoiceresponse.md | 6 +- .../docs/models/shared/createitemresponse.md | 6 +- .../shared/createjournalentryresponse.md | 6 +- .../models/shared/createjournalresponse.md | 6 +- .../models/shared/createpaymentresponse.md | 6 +- .../shared/createpurchaseorderresponse.md | 6 +- .../models/shared/createsupplierresponse.md | 6 +- .../models/shared/createtransferresponse.md | 6 +- .../docs/models/shared/creditnote.md | 22 +- .../docs/models/shared/creditnotelineitem.md | 16 +- .../shared/creditnotelineitemtracking.md | 15 +- .../docs/models/shared/creditnotes.md | 2 - .../accounting/docs/models/shared/customer.md | 2 +- .../docs/models/shared/customers.md | 2 - .../accounting/docs/models/shared/dataset.md | 2 - .../docs/models/shared/directcost.md | 12 +- .../docs/models/shared/directcostlineitem.md | 16 +- .../docs/models/shared/directcosts.md | 2 - .../docs/models/shared/directincome.md | 12 +- .../models/shared/directincomelineitem.md | 14 +- .../docs/models/shared/directincomes.md | 2 - .../shared/{schema.md => errormessage.md} | 4 +- .../accounting/docs/models/shared/invoice.md | 22 +- .../docs/models/shared/invoiceitem.md | 2 +- .../docs/models/shared/invoicelineitem.md | 16 +- .../accounting/docs/models/shared/invoices.md | 2 - .../docs/models/shared/invoiceto.md | 17 +- .../accounting/docs/models/shared/items1.md | 2 - .../docs/models/shared/itemsallocation.md | 4 +- .../docs/models/shared/journalentries.md | 2 - .../docs/models/shared/journalentry.md | 4 +- .../docs/models/shared/journalline.md | 2 +- .../accounting/docs/models/shared/journals.md | 2 - .../accounting/docs/models/shared/payment.md | 10 +- .../models/shared/paymentallocationpayment.md | 4 +- .../docs/models/shared/paymentline.md | 2 +- .../docs/models/shared/paymentlinelink.md | 4 +- .../docs/models/shared/paymentmethodref.md | 9 - .../docs/models/shared/paymentmethods.md | 2 - .../accounting/docs/models/shared/payments.md | 2 - .../docs/models/shared/profitandlossreport.md | 8 +- .../docs/models/shared/propertiestracking.md | 14 +- .../docs/models/shared/propertiestracking1.md | 15 +- .../docs/models/shared/purchaseorder.md | 10 +- .../models/shared/purchaseorderlineitem.md | 14 +- .../docs/models/shared/purchaseorders.md | 2 - .../models/shared/pushoperationsummary.md | 6 +- .../docs/models/shared/pushoption.md | 2 - .../docs/models/shared/reportline.md | 2 +- .../docs/models/shared/salesorder.md | 12 +- .../docs/models/shared/salesorderlineitem.md | 14 +- .../docs/models/shared/salesorders.md | 2 - .../docs/models/shared/supplementaldata.md | 2 +- .../accounting/docs/models/shared/supplier.md | 32 +- .../docs/models/shared/suppliers.md | 2 - .../accounting/docs/models/shared/taxrate.md | 4 +- .../docs/models/shared/taxratecomponent.md | 2 +- .../docs/models/shared/taxrateref.md | 2 +- .../accounting/docs/models/shared/taxrates.md | 2 - .../accounting/docs/models/shared/tracking.md | 8 +- .../docs/models/shared/trackingcategories.md | 2 - .../docs/models/shared/trackingcategory.md | 102 +++ .../docs/models/shared/trackingcategoryref.md | 2 + .../models/shared/trackingrecordreference.md | 17 +- .../accounting/docs/models/shared/transfer.md | 2 +- .../docs/models/shared/transferaccount.md | 2 +- .../docs/models/shared/transfers.md | 2 - .../shared/updatebankaccountresponse.md | 35 +- .../shared/updatebillcreditnoteresponse.md | 6 +- .../docs/models/shared/updatebillresponse.md | 6 +- .../models/shared/updatecreditnoteresponse.md | 6 +- .../models/shared/updatecustomerresponse.md | 6 +- .../models/shared/updateinvoiceresponse.md | 6 +- .../shared/updatepurchaseorderresponse.md | 6 +- .../models/shared/updatesupplierresponse.md | 6 +- .../docs/models/shared/withholdingtaxitems.md | 2 +- .../accounting/docs/sdks/accounts/README.md | 38 +- .../docs/sdks/accounttransactions/README.md | 4 +- .../docs/sdks/bankaccounts/README.md | 64 +- .../sdks/bankaccounttransactions/README.md | 34 +- .../docs/sdks/billcreditnotes/README.md | 383 +++++------ .../docs/sdks/billpayments/README.md | 85 +-- .../accounting/docs/sdks/bills/README.md | 522 ++++---------- .../docs/sdks/codataccounting/README.md | 2 +- .../docs/sdks/companyinfo/README.md | 4 +- .../docs/sdks/creditnotes/README.md | 466 ++++--------- .../accounting/docs/sdks/customers/README.md | 322 ++------- .../docs/sdks/directcosts/README.md | 147 ++-- .../docs/sdks/directincomes/README.md | 284 ++------ .../accounting/docs/sdks/invoices/README.md | 650 ++++-------------- .../accounting/docs/sdks/items/README.md | 51 +- .../docs/sdks/journalentries/README.md | 76 +- .../accounting/docs/sdks/journals/README.md | 24 +- .../docs/sdks/paymentmethods/README.md | 8 +- .../accounting/docs/sdks/payments/README.md | 107 +-- .../docs/sdks/purchaseorders/README.md | 254 +++---- .../accounting/docs/sdks/reports/README.md | 14 +- .../docs/sdks/salesorders/README.md | 8 +- .../accounting/docs/sdks/suppliers/README.md | 137 ++-- .../accounting/docs/sdks/taxrates/README.md | 8 +- .../docs/sdks/trackingcategories/README.md | 8 +- .../accounting/docs/sdks/transfers/README.md | 119 ++-- previous-versions/accounting/files.gen | 89 +-- previous-versions/accounting/gen.yaml | 19 +- previous-versions/accounting/pylintrc | 6 +- previous-versions/accounting/setup.py | 8 +- .../codataccounting/account_transactions.py | 56 +- .../src/codataccounting/accounts.py | 104 +-- .../bank_account_transactions.py | 82 ++- .../src/codataccounting/bank_accounts.py | 128 ++-- .../src/codataccounting/bill_credit_notes.py | 188 +++-- .../src/codataccounting/bill_payments.py | 134 ++-- .../accounting/src/codataccounting/bills.py | 250 ++++--- .../src/codataccounting/company_info.py | 40 +- .../src/codataccounting/credit_notes.py | 128 ++-- .../src/codataccounting/customers.py | 198 ++++-- .../src/codataccounting/direct_costs.py | 196 ++++-- .../src/codataccounting/direct_incomes.py | 196 ++++-- .../src/codataccounting/invoices.py | 265 ++++--- .../accounting/src/codataccounting/items.py | 104 +-- .../src/codataccounting/journal_entries.py | 138 ++-- .../src/codataccounting/journals.py | 104 +-- .../codataccounting/models/errors/__init__.py | 4 + .../codataccounting/models/errors/sdkerror.py | 24 + .../models/operations/__init__.py | 4 +- .../models/operations/create_account.py | 6 +- .../models/operations/create_bank_account.py | 6 +- .../operations/create_bank_transactions.py | 6 +- .../models/operations/create_bill.py | 6 +- .../operations/create_bill_credit_note.py | 6 +- .../models/operations/create_bill_payment.py | 6 +- .../models/operations/create_credit_note.py | 6 +- .../models/operations/create_customer.py | 6 +- .../models/operations/create_direct_cost.py | 6 +- .../models/operations/create_direct_income.py | 6 +- .../models/operations/create_invoice.py | 6 +- .../models/operations/create_item.py | 6 +- .../models/operations/create_journal.py | 6 +- .../models/operations/create_journal_entry.py | 6 +- .../models/operations/create_payment.py | 6 +- .../operations/create_purchase_order.py | 6 +- .../models/operations/create_supplier.py | 6 +- .../models/operations/create_transfer.py | 6 +- .../models/operations/delete_bill.py | 6 +- .../models/operations/delete_billpayment.py | 6 +- .../models/operations/delete_invoice.py | 6 +- .../models/operations/delete_journal_entry.py | 6 +- .../operations/download_bill_attachment.py | 6 +- .../download_customer_attachment.py | 6 +- .../download_direct_cost_attachment.py | 6 +- .../download_direct_income_attachment.py | 6 +- .../operations/download_invoice_attachment.py | 6 +- .../download_supplier_attachment.py | 6 +- .../models/operations/get_account.py | 25 +- .../operations/get_account_transaction.py | 25 +- .../operations/get_aged_creditors_report.py | 6 +- .../operations/get_aged_debtors_report.py | 6 +- .../models/operations/get_balance_sheet.py | 25 +- .../models/operations/get_bank_account.py | 25 +- .../models/operations/get_bill.py | 25 +- .../models/operations/get_bill_attachment.py | 6 +- .../models/operations/get_bill_credit_note.py | 25 +- .../models/operations/get_bill_payments.py | 25 +- .../operations/get_cash_flow_statement.py | 25 +- .../models/operations/get_company_info.py | 25 +- .../get_create_bank_transactions_model.py | 6 +- .../get_create_billpayments_model.py | 6 +- .../get_create_chartofaccounts_model.py | 6 +- .../get_create_directcosts_model.py | 6 +- .../get_create_directincomes_model.py | 6 +- .../operations/get_create_items_model.py | 6 +- .../get_create_journalentries_model.py | 6 +- .../operations/get_create_journals_model.py | 6 +- .../operations/get_create_payments_model.py | 6 +- .../operations/get_create_transfers_model.py | 6 +- .../get_create_update_bankaccounts_model.py | 6 +- ...get_create_update_billcreditnotes_model.py | 6 +- .../get_create_update_bills_model.py | 6 +- .../get_create_update_creditnotes_model.py | 6 +- .../get_create_update_customers_model.py | 6 +- .../get_create_update_invoices_model.py | 6 +- .../get_create_update_purchaseorders_model.py | 6 +- .../get_create_update_suppliers_model.py | 6 +- .../models/operations/get_credit_note.py | 25 +- .../models/operations/get_customer.py | 25 +- .../operations/get_customer_attachment.py | 6 +- .../models/operations/get_direct_cost.py | 25 +- .../operations/get_direct_cost_attachment.py | 6 +- .../models/operations/get_direct_income.py | 25 +- .../get_direct_income_attachment.py | 6 +- .../models/operations/get_invoice.py | 25 +- .../operations/get_invoice_attachment.py | 6 +- .../models/operations/get_item.py | 25 +- .../models/operations/get_journal.py | 25 +- .../models/operations/get_journal_entry.py | 25 +- .../models/operations/get_payment.py | 25 +- .../models/operations/get_payment_method.py | 25 +- .../models/operations/get_profit_and_loss.py | 25 +- .../models/operations/get_purchase_order.py | 25 +- .../models/operations/get_sales_order.py | 25 +- .../models/operations/get_supplier.py | 25 +- .../operations/get_supplier_attachment.py | 6 +- .../models/operations/get_tax_rate.py | 25 +- .../operations/get_tracking_category.py | 25 +- .../models/operations/get_transfer.py | 25 +- .../operations/list_account_transactions.py | 25 +- .../models/operations/list_accounts.py | 25 +- .../list_bank_account_transactions.py | 29 +- .../models/operations/list_bank_accounts.py | 25 +- .../operations/list_bill_attachments.py | 6 +- .../operations/list_bill_credit_notes.py | 25 +- .../models/operations/list_bill_payments.py | 25 +- .../models/operations/list_bills.py | 25 +- .../models/operations/list_credit_notes.py | 25 +- .../operations/list_customer_attachments.py | 6 +- .../models/operations/list_customers.py | 25 +- .../list_direct_cost_attachments.py | 6 +- .../models/operations/list_direct_costs.py | 25 +- .../list_direct_income_attachments.py | 6 +- .../models/operations/list_direct_incomes.py | 25 +- .../operations/list_invoice_attachments.py | 6 +- .../models/operations/list_invoices.py | 25 +- .../models/operations/list_items.py | 25 +- .../models/operations/list_journal_entries.py | 25 +- .../models/operations/list_journals.py | 25 +- .../models/operations/list_payment_methods.py | 25 +- .../models/operations/list_payments.py | 25 +- .../models/operations/list_purchase_orders.py | 25 +- .../models/operations/list_sales_orders.py | 25 +- .../operations/list_supplier_attachments.py | 6 +- .../models/operations/list_suppliers.py | 25 +- .../models/operations/list_tax_rates.py | 25 +- .../operations/list_tracking_categories.py | 25 +- .../models/operations/list_transfers.py | 25 +- .../models/operations/refresh_company_info.py | 6 +- .../models/operations/update_bank_account.py | 6 +- .../models/operations/update_bill.py | 6 +- .../operations/update_bill_credit_note.py | 6 +- .../models/operations/update_credit_note.py | 6 +- .../models/operations/update_customer.py | 6 +- .../models/operations/update_invoice.py | 6 +- .../operations/update_purchase_order.py | 6 +- .../models/operations/update_supplier.py | 6 +- .../operations/upload_bill_attachment.py | 6 +- .../upload_billcreditnote_attachment.py | 39 ++ .../upload_direct_cost_attachment.py | 6 +- .../upload_direct_income_attachment.py | 6 +- .../operations/upload_invoice_attachment.py | 6 +- .../operations/upload_transfer_attachment.py | 39 ++ .../codataccounting/models/shared/__init__.py | 12 +- .../codataccounting/models/shared/account.py | 49 +- ...ddresstype.py => accountingaddresstype.py} | 2 +- ...ustomerref.py => accountingcustomerref.py} | 2 +- .../codataccounting/models/shared/accounts.py | 1 - .../models/shared/accounttransaction.py | 51 +- .../models/shared/accounttransactionline.py | 14 +- .../models/shared/accounttransactions.py | 1 - .../models/shared/addressesitems.py | 4 +- .../models/shared/agedcreditor.py | 75 +- .../models/shared/agedcreditorreport.py | 46 +- .../shared/agedcurrencyoutstandingitems.py | 75 +- .../models/shared/ageddebtorreport.py | 46 +- .../models/shared/agedoutstandingamount.py | 63 ++ ...dref.py => agedoutstandingamountdetail.py} | 9 +- .../models/shared/attachment.py | 24 +- .../models/shared/attachmentsdataset.py | 1 - .../models/shared/balancesheet.py | 15 +- .../models/shared/balancesheet1.py | 42 +- .../models/shared/bankaccount.py | 29 +- .../models/shared/bankaccounts.py | 1 - .../models/shared/banktransactions.py | 41 +- .../models/shared/banktransactionsresponse.py | 23 - .../src/codataccounting/models/shared/bill.py | 91 +-- .../models/shared/billcreditnote.py | 75 +- .../models/shared/billcreditnotelineitem.py | 27 +- .../models/shared/billcreditnotes.py | 1 - .../codataccounting/models/shared/billitem.py | 7 +- .../models/shared/billlineitem.py | 26 +- .../models/shared/billpayment.py | 134 ++-- .../models/shared/billpaymentline.py | 15 +- .../models/shared/billpaymentlinelink.py | 23 +- .../models/shared/billpayments.py | 1 - .../codataccounting/models/shared/bills.py | 1 - .../models/shared/cashflowstatement.py | 24 +- .../models/shared/cashflowstatement1.py | 38 +- .../models/shared/companydataset.py | 50 +- .../codataccounting/models/shared/contact.py | 12 +- .../models/shared/createaccountresponse.py | 47 +- .../shared/createbankaccountresponse.py | 37 +- .../shared/createbankaccounttransaction.py | 17 +- .../shared/createbanktransactionsresponse.py | 29 +- .../shared/createbillcreditnoteresponse.py | 39 +- .../shared/createbillpaymentresponse.py | 133 ++-- .../models/shared/createbillresponse.py | 39 +- .../models/shared/createcreditnoteresponse.py | 37 +- .../models/shared/createcustomerresponse.py | 35 +- .../models/shared/createdirectcostresponse.py | 39 +- .../shared/createdirectincomeresponse.py | 41 +- .../models/shared/createinvoiceresponse.py | 43 +- .../models/shared/createitemresponse.py | 33 +- .../shared/createjournalentryresponse.py | 45 +- .../models/shared/createjournalresponse.py | 47 +- .../models/shared/createpaymentresponse.py | 225 +++--- .../shared/createpurchaseorderresponse.py | 35 +- .../models/shared/createsupplierresponse.py | 33 +- .../models/shared/createtransferresponse.py | 31 +- .../models/shared/creditnote.py | 81 +-- .../models/shared/creditnotelineitem.py | 33 +- .../models/shared/creditnotes.py | 1 - .../codataccounting/models/shared/customer.py | 16 +- .../models/shared/customers.py | 1 - .../codataccounting/models/shared/dataset.py | 25 +- .../models/shared/directcost.py | 57 +- .../models/shared/directcostlineitem.py | 25 +- .../models/shared/directcosts.py | 1 - .../models/shared/directincome.py | 59 +- .../models/shared/directincomelineitem.py | 21 +- .../models/shared/directincomes.py | 1 - .../shared/{schema.py => errormessage.py} | 3 +- .../codataccounting/models/shared/invoice.py | 101 +-- .../models/shared/invoiceitem.py | 7 +- .../models/shared/invoicelineitem.py | 23 +- .../codataccounting/models/shared/invoices.py | 1 - .../models/shared/invoicestatus.py | 2 +- .../models/shared/invoiceto.py | 13 +- .../src/codataccounting/models/shared/item.py | 8 +- .../codataccounting/models/shared/items.py | 39 +- .../codataccounting/models/shared/items1.py | 1 - .../models/shared/itemstatus.py | 4 +- .../codataccounting/models/shared/journal.py | 30 +- .../models/shared/journalentries.py | 1 - .../models/shared/journalentry.py | 67 +- .../models/shared/journalline.py | 3 +- .../codataccounting/models/shared/journals.py | 1 - .../codataccounting/models/shared/payment.py | 248 +++---- .../models/shared/paymentallocationpayment.py | 39 +- .../models/shared/paymentline.py | 15 +- .../models/shared/paymentlinelink.py | 21 +- .../models/shared/paymentmethod.py | 4 +- .../models/shared/paymentmethods.py | 1 - .../codataccounting/models/shared/payments.py | 1 - .../models/shared/profitandlossreport.py | 33 +- .../models/shared/profitandlossreport1.py | 42 +- .../models/shared/propertiestracking.py | 4 +- .../models/shared/propertiestracking1.py | 10 +- .../models/shared/purchaseorder.py | 87 +-- .../models/shared/purchaseorderlineitem.py | 19 +- .../models/shared/purchaseorders.py | 1 - .../models/shared/pushoperationsummary.py | 28 +- .../models/shared/pushoption.py | 1 - .../models/shared/reportline.py | 3 +- .../models/shared/salesorder.py | 67 +- .../models/shared/salesorderlineitem.py | 19 +- .../models/shared/salesorders.py | 1 - .../models/shared/supplementaldata.py | 4 +- .../codataccounting/models/shared/supplier.py | 8 +- .../models/shared/suppliers.py | 1 - .../codataccounting/models/shared/taxrate.py | 17 +- .../models/shared/taxratecomponent.py | 3 +- .../models/shared/taxrateref.py | 7 +- .../codataccounting/models/shared/taxrates.py | 1 - .../codataccounting/models/shared/tracking.py | 24 +- .../models/shared/trackingcategories.py | 1 - .../models/shared/trackingcategory.py | 118 +++- .../models/shared/trackingcategoryref.py | 4 +- .../codataccounting/models/shared/transfer.py | 18 +- .../models/shared/transferaccount.py | 9 +- .../models/shared/transfers.py | 1 - .../shared/updatebankaccountresponse.py | 52 +- .../shared/updatebillcreditnoteresponse.py | 39 +- .../models/shared/updatebillresponse.py | 39 +- .../models/shared/updatecreditnoteresponse.py | 37 +- .../models/shared/updatecustomerresponse.py | 35 +- .../models/shared/updateinvoiceresponse.py | 43 +- .../shared/updatepurchaseorderresponse.py | 35 +- .../models/shared/updatesupplierresponse.py | 33 +- .../models/shared/validdatatypelinks.py | 22 +- .../models/shared/withholdingtaxitems.py | 3 +- .../src/codataccounting/payment_methods.py | 56 +- .../src/codataccounting/payments.py | 104 +-- .../src/codataccounting/purchase_orders.py | 128 ++-- .../accounting/src/codataccounting/reports.py | 116 +++- .../src/codataccounting/sales_orders.py | 56 +- .../accounting/src/codataccounting/sdk.py | 15 +- .../src/codataccounting/sdkconfiguration.py | 9 +- .../src/codataccounting/suppliers.py | 198 ++++-- .../src/codataccounting/tax_rates.py | 56 +- .../codataccounting/tracking_categories.py | 56 +- .../src/codataccounting/transfers.py | 158 +++-- .../src/codataccounting/utils/utils.py | 57 +- 621 files changed, 7199 insertions(+), 8989 deletions(-) create mode 100755 previous-versions/accounting/.gitattributes delete mode 100755 previous-versions/accounting/docs/models/operations/getaccount409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getaccounttransaction409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getbalancesheet409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getbankaccount409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getbill409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getbillcreditnote409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getbillpayments409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getcashflowstatement409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getcompanyinfo409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getcreditnote409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getcustomer409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getdirectcost409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getdirectincome409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getinvoice409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getitem409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getjournal409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getjournalentry409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getpayment409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getpaymentmethod409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getprofitandloss409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getpurchaseorder409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getsalesorder409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/getsupplier409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/gettaxrate409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/gettrackingcategory409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/gettransfer409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listaccounts409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listaccounttransactions409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listbankaccounts409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listbankaccounttransactions409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listbillcreditnotes409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listbillpayments409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listbills409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listcreditnotes409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listcustomers409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listdirectcosts409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listdirectincomes409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listinvoices409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listitems409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listjournalentries409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listjournals409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listpaymentmethods409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listpayments409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listpurchaseorders409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listsalesorders409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listsuppliers409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listtaxrates409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listtrackingcategories409applicationjson.md delete mode 100755 previous-versions/accounting/docs/models/operations/listtransfers409applicationjson.md create mode 100755 previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentrequest.md create mode 100755 previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentrequestbody.md create mode 100755 previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentresponse.md create mode 100755 previous-versions/accounting/docs/models/operations/uploadtransferattachmentrequest.md create mode 100755 previous-versions/accounting/docs/models/operations/uploadtransferattachmentrequestbody.md create mode 100755 previous-versions/accounting/docs/models/operations/uploadtransferattachmentresponse.md rename previous-versions/accounting/docs/models/shared/{addresstype.md => accountingaddresstype.md} (88%) rename previous-versions/accounting/docs/models/shared/{customerref.md => accountingcustomerref.md} (96%) delete mode 100755 previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamount.md delete mode 100755 previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamountamountsoutstandingbydatatype.md rename previous-versions/accounting/docs/models/shared/{itemsagedoutstandingamount.md => agedoutstandingamount.md} (98%) rename previous-versions/accounting/docs/models/shared/{itemsagedoutstandingamountamountsoutstandingbydatatype.md => agedoutstandingamountdetail.md} (88%) delete mode 100755 previous-versions/accounting/docs/models/shared/banktransactionsresponse.md create mode 100755 previous-versions/accounting/docs/models/shared/banktransactionssourcemodifieddate.md create mode 100755 previous-versions/accounting/docs/models/shared/companydatasetaccountingaddress.md delete mode 100755 previous-versions/accounting/docs/models/shared/companydatasetaddresses.md rename previous-versions/accounting/docs/models/shared/{schema.md => errormessage.md} (93%) delete mode 100755 previous-versions/accounting/docs/models/shared/paymentmethodref.md create mode 100755 previous-versions/accounting/src/codataccounting/models/errors/__init__.py create mode 100755 previous-versions/accounting/src/codataccounting/models/errors/sdkerror.py create mode 100755 previous-versions/accounting/src/codataccounting/models/operations/upload_billcreditnote_attachment.py create mode 100755 previous-versions/accounting/src/codataccounting/models/operations/upload_transfer_attachment.py rename previous-versions/accounting/src/codataccounting/models/shared/{addresstype.py => accountingaddresstype.py} (85%) rename previous-versions/accounting/src/codataccounting/models/shared/{customerref.py => accountingcustomerref.py} (96%) create mode 100755 previous-versions/accounting/src/codataccounting/models/shared/agedoutstandingamount.py rename previous-versions/accounting/src/codataccounting/models/shared/{paymentmethodref.py => agedoutstandingamountdetail.py} (53%) delete mode 100755 previous-versions/accounting/src/codataccounting/models/shared/banktransactionsresponse.py rename previous-versions/accounting/src/codataccounting/models/shared/{schema.py => errormessage.py} (95%) diff --git a/previous-versions/accounting/.gitattributes b/previous-versions/accounting/.gitattributes new file mode 100755 index 000000000..4d75d5900 --- /dev/null +++ b/previous-versions/accounting/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.py linguist-generated=false \ No newline at end of file diff --git a/previous-versions/accounting/README.md b/previous-versions/accounting/README.md index 58f0d06f7..4a6190d4d 100644 --- a/previous-versions/accounting/README.md +++ b/previous-versions/accounting/README.md @@ -5,15 +5,244 @@ It gives you a simple way to view, create, update adn delete data without having -replace me +## SDK Installation + +```bash +pip install codat-accounting +``` ## Example Usage -replace me + + +```python +import codataccounting +from codataccounting.models import operations, shared + +s = codataccounting.CodatAccounting( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = operations.GetAccountTransactionRequest( + account_transaction_id='corrupti', + company_id='8a210b68-6988-11ed-a1eb-0242ac120002', + connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', +) + +res = s.account_transactions.get(req) + +if res.account_transaction is not None: + # handle response +``` -replace me +## Available Resources and Operations + + +### [account_transactions](docs/sdks/accounttransactions/README.md) + +* [get](docs/sdks/accounttransactions/README.md#get) - Get account transaction +* [list](docs/sdks/accounttransactions/README.md#list) - List account transactions + +### [accounts](docs/sdks/accounts/README.md) + +* [create](docs/sdks/accounts/README.md#create) - Create account +* [get](docs/sdks/accounts/README.md#get) - Get account +* [get_create_model](docs/sdks/accounts/README.md#get_create_model) - Get create account model +* [list](docs/sdks/accounts/README.md#list) - List accounts + +### [bank_account_transactions](docs/sdks/bankaccounttransactions/README.md) + +* [create](docs/sdks/bankaccounttransactions/README.md#create) - Create bank account transactions +* [get_create_model](docs/sdks/bankaccounttransactions/README.md#get_create_model) - Get create bank account transactions model +* [list](docs/sdks/bankaccounttransactions/README.md#list) - List bank account transactions + +### [bank_accounts](docs/sdks/bankaccounts/README.md) + +* [create](docs/sdks/bankaccounts/README.md#create) - Create bank account +* [get](docs/sdks/bankaccounts/README.md#get) - Get bank account +* [get_create_update_model](docs/sdks/bankaccounts/README.md#get_create_update_model) - Get create/update bank account model +* [list](docs/sdks/bankaccounts/README.md#list) - List bank accounts +* [update](docs/sdks/bankaccounts/README.md#update) - Update bank account + +### [bill_credit_notes](docs/sdks/billcreditnotes/README.md) + +* [create](docs/sdks/billcreditnotes/README.md#create) - Create bill credit note +* [get](docs/sdks/billcreditnotes/README.md#get) - Get bill credit note +* [get_create_update_model](docs/sdks/billcreditnotes/README.md#get_create_update_model) - Get create/update bill credit note model +* [list](docs/sdks/billcreditnotes/README.md#list) - List bill credit notes +* [update](docs/sdks/billcreditnotes/README.md#update) - Update bill credit note +* [upload_attachment](docs/sdks/billcreditnotes/README.md#upload_attachment) - Upload bill credit note attachment + +### [bill_payments](docs/sdks/billpayments/README.md) + +* [create](docs/sdks/billpayments/README.md#create) - Create bill payments +* [delete](docs/sdks/billpayments/README.md#delete) - Delete bill payment +* [get](docs/sdks/billpayments/README.md#get) - Get bill payment +* [get_create_model](docs/sdks/billpayments/README.md#get_create_model) - Get create bill payment model +* [list](docs/sdks/billpayments/README.md#list) - List bill payments + +### [bills](docs/sdks/bills/README.md) + +* [create](docs/sdks/bills/README.md#create) - Create bill +* [delete](docs/sdks/bills/README.md#delete) - Delete bill +* [download_attachment](docs/sdks/bills/README.md#download_attachment) - Download bill attachment +* [get](docs/sdks/bills/README.md#get) - Get bill +* [get_attachment](docs/sdks/bills/README.md#get_attachment) - Get bill attachment +* [get_create_update_model](docs/sdks/bills/README.md#get_create_update_model) - Get create/update bill model +* [list](docs/sdks/bills/README.md#list) - List bills +* [list_attachments](docs/sdks/bills/README.md#list_attachments) - List bill attachments +* [update](docs/sdks/bills/README.md#update) - Update bill +* [upload_attachment](docs/sdks/bills/README.md#upload_attachment) - Upload bill attachment + +### [company_info](docs/sdks/companyinfo/README.md) + +* [get](docs/sdks/companyinfo/README.md#get) - Get company info +* [refresh](docs/sdks/companyinfo/README.md#refresh) - Refresh company info + +### [credit_notes](docs/sdks/creditnotes/README.md) + +* [create](docs/sdks/creditnotes/README.md#create) - Create credit note +* [get](docs/sdks/creditnotes/README.md#get) - Get credit note +* [get_create_update_model](docs/sdks/creditnotes/README.md#get_create_update_model) - Get create/update credit note model +* [list](docs/sdks/creditnotes/README.md#list) - List credit notes +* [update](docs/sdks/creditnotes/README.md#update) - Update creditNote + +### [customers](docs/sdks/customers/README.md) + +* [create](docs/sdks/customers/README.md#create) - Create customer +* [download_attachment](docs/sdks/customers/README.md#download_attachment) - Download customer attachment +* [get](docs/sdks/customers/README.md#get) - Get customer +* [get_attachment](docs/sdks/customers/README.md#get_attachment) - Get customer attachment +* [get_create_update_model](docs/sdks/customers/README.md#get_create_update_model) - Get create/update customer model +* [list](docs/sdks/customers/README.md#list) - List customers +* [list_attachments](docs/sdks/customers/README.md#list_attachments) - List customer attachments +* [update](docs/sdks/customers/README.md#update) - Update customer + +### [direct_costs](docs/sdks/directcosts/README.md) + +* [create](docs/sdks/directcosts/README.md#create) - Create direct cost +* [download_attachment](docs/sdks/directcosts/README.md#download_attachment) - Download direct cost attachment +* [get](docs/sdks/directcosts/README.md#get) - Get direct cost +* [get_attachment](docs/sdks/directcosts/README.md#get_attachment) - Get direct cost attachment +* [get_create_model](docs/sdks/directcosts/README.md#get_create_model) - Get create direct cost model +* [list](docs/sdks/directcosts/README.md#list) - List direct costs +* [list_attachments](docs/sdks/directcosts/README.md#list_attachments) - List direct cost attachments +* [upload_attachment](docs/sdks/directcosts/README.md#upload_attachment) - Upload direct cost attachment + +### [direct_incomes](docs/sdks/directincomes/README.md) + +* [create](docs/sdks/directincomes/README.md#create) - Create direct income +* [download_attachment](docs/sdks/directincomes/README.md#download_attachment) - Download direct income attachment +* [get](docs/sdks/directincomes/README.md#get) - Get direct income +* [get_attachment](docs/sdks/directincomes/README.md#get_attachment) - Get direct income attachment +* [get_create_model](docs/sdks/directincomes/README.md#get_create_model) - Get create direct income model +* [list](docs/sdks/directincomes/README.md#list) - List direct incomes +* [list_attachments](docs/sdks/directincomes/README.md#list_attachments) - List direct income attachments +* [upload_attachment](docs/sdks/directincomes/README.md#upload_attachment) - Create direct income attachment + +### [invoices](docs/sdks/invoices/README.md) + +* [create](docs/sdks/invoices/README.md#create) - Create invoice +* [delete](docs/sdks/invoices/README.md#delete) - Delete invoice +* [download_attachment](docs/sdks/invoices/README.md#download_attachment) - Download invoice attachment +* [download_pdf](docs/sdks/invoices/README.md#download_pdf) - Get invoice as PDF +* [get](docs/sdks/invoices/README.md#get) - Get invoice +* [get_attachment](docs/sdks/invoices/README.md#get_attachment) - Get invoice attachment +* [get_create_update_model](docs/sdks/invoices/README.md#get_create_update_model) - Get create/update invoice model +* [list](docs/sdks/invoices/README.md#list) - List invoices +* [list_attachments](docs/sdks/invoices/README.md#list_attachments) - List invoice attachments +* [update](docs/sdks/invoices/README.md#update) - Update invoice +* [upload_attachment](docs/sdks/invoices/README.md#upload_attachment) - Push invoice attachment + +### [items](docs/sdks/items/README.md) + +* [create](docs/sdks/items/README.md#create) - Create item +* [get](docs/sdks/items/README.md#get) - Get item +* [get_create_model](docs/sdks/items/README.md#get_create_model) - Get create item model +* [list](docs/sdks/items/README.md#list) - List items + +### [journal_entries](docs/sdks/journalentries/README.md) + +* [create](docs/sdks/journalentries/README.md#create) - Create journal entry +* [delete](docs/sdks/journalentries/README.md#delete) - Delete journal entry +* [get](docs/sdks/journalentries/README.md#get) - Get journal entry +* [get_create_model](docs/sdks/journalentries/README.md#get_create_model) - Get create journal entry model +* [list](docs/sdks/journalentries/README.md#list) - List journal entries + +### [journals](docs/sdks/journals/README.md) + +* [create](docs/sdks/journals/README.md#create) - Create journal +* [get](docs/sdks/journals/README.md#get) - Get journal +* [get_create_model](docs/sdks/journals/README.md#get_create_model) - Get create journal model +* [list](docs/sdks/journals/README.md#list) - List journals + +### [payment_methods](docs/sdks/paymentmethods/README.md) + +* [get](docs/sdks/paymentmethods/README.md#get) - Get payment method +* [list](docs/sdks/paymentmethods/README.md#list) - List payment methods + +### [payments](docs/sdks/payments/README.md) + +* [create](docs/sdks/payments/README.md#create) - Create payment +* [get](docs/sdks/payments/README.md#get) - Get payment +* [get_create_model](docs/sdks/payments/README.md#get_create_model) - Get create payment model +* [list](docs/sdks/payments/README.md#list) - List payments + +### [purchase_orders](docs/sdks/purchaseorders/README.md) + +* [create](docs/sdks/purchaseorders/README.md#create) - Create purchase order +* [get](docs/sdks/purchaseorders/README.md#get) - Get purchase order +* [get_create_update_model](docs/sdks/purchaseorders/README.md#get_create_update_model) - Get create/update purchase order model +* [list](docs/sdks/purchaseorders/README.md#list) - List purchase orders +* [update](docs/sdks/purchaseorders/README.md#update) - Update purchase order + +### [reports](docs/sdks/reports/README.md) + +* [get_aged_creditors_report](docs/sdks/reports/README.md#get_aged_creditors_report) - Aged creditors report +* [get_aged_debtors_report](docs/sdks/reports/README.md#get_aged_debtors_report) - Aged debtors report +* [get_balance_sheet](docs/sdks/reports/README.md#get_balance_sheet) - Get balance sheet +* [get_cash_flow_statement](docs/sdks/reports/README.md#get_cash_flow_statement) - Get cash flow statement +* [get_profit_and_loss](docs/sdks/reports/README.md#get_profit_and_loss) - Get profit and loss +* [is_aged_creditors_report_available](docs/sdks/reports/README.md#is_aged_creditors_report_available) - Aged creditors report available +* [is_aged_debtor_report_available](docs/sdks/reports/README.md#is_aged_debtor_report_available) - Aged debtors report available + +### [sales_orders](docs/sdks/salesorders/README.md) + +* [get](docs/sdks/salesorders/README.md#get) - Get sales order +* [list](docs/sdks/salesorders/README.md#list) - List sales orders + +### [suppliers](docs/sdks/suppliers/README.md) + +* [create](docs/sdks/suppliers/README.md#create) - Create supplier +* [download_attachment](docs/sdks/suppliers/README.md#download_attachment) - Download supplier attachment +* [get](docs/sdks/suppliers/README.md#get) - Get supplier +* [get_attachment](docs/sdks/suppliers/README.md#get_attachment) - Get supplier attachment +* [get_create_update_model](docs/sdks/suppliers/README.md#get_create_update_model) - Get create/update supplier model +* [list](docs/sdks/suppliers/README.md#list) - List suppliers +* [list_attachments](docs/sdks/suppliers/README.md#list_attachments) - List supplier attachments +* [update](docs/sdks/suppliers/README.md#update) - Update supplier + +### [tax_rates](docs/sdks/taxrates/README.md) + +* [get](docs/sdks/taxrates/README.md#get) - Get tax rate +* [list](docs/sdks/taxrates/README.md#list) - List all tax rates + +### [tracking_categories](docs/sdks/trackingcategories/README.md) + +* [get](docs/sdks/trackingcategories/README.md#get) - Get tracking categories +* [list](docs/sdks/trackingcategories/README.md#list) - List tracking categories + +### [transfers](docs/sdks/transfers/README.md) + +* [create](docs/sdks/transfers/README.md#create) - Create transfer +* [get](docs/sdks/transfers/README.md#get) - Get transfer +* [get_create_model](docs/sdks/transfers/README.md#get_create_model) - Get create transfer model +* [list](docs/sdks/transfers/README.md#list) - List transfers +* [upload_attachment](docs/sdks/transfers/README.md#upload_attachment) - Push invoice attachment ### Library generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) diff --git a/previous-versions/accounting/RELEASES.md b/previous-versions/accounting/RELEASES.md index 416850e54..dbeae57a0 100644 --- a/previous-versions/accounting/RELEASES.md +++ b/previous-versions/accounting/RELEASES.md @@ -598,4 +598,14 @@ Based on: - OpenAPI Doc 2.1.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml - Speakeasy CLI 1.53.0 (2.58.0) https://github.com/speakeasy-api/speakeasy ### Releases -- [PyPI v0.28.1] https://pypi.org/project/codat-accounting/0.28.1 - accounting \ No newline at end of file +- [PyPI v0.28.1] https://pypi.org/project/codat-accounting/0.28.1 - accounting + +## 2023-09-13 11:20:39 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Accounting.yaml +- Speakeasy CLI 1.82.5 (2.108.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.1.0] previous-versions/accounting +### Releases +- [PyPI v0.1.0] https://pypi.org/project/codat-accounting/0.1.0 - previous-versions/accounting \ No newline at end of file diff --git a/previous-versions/accounting/USAGE.md b/previous-versions/accounting/USAGE.md index 69f506426..36a860d6a 100755 --- a/previous-versions/accounting/USAGE.md +++ b/previous-versions/accounting/USAGE.md @@ -1,7 +1,9 @@ + + ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( diff --git a/previous-versions/accounting/docs/models/operations/createaccountresponse.md b/previous-versions/accounting/docs/models/operations/createaccountresponse.md index 7de2969b3..146716ba1 100755 --- a/previous-versions/accounting/docs/models/operations/createaccountresponse.md +++ b/previous-versions/accounting/docs/models/operations/createaccountresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_account_response` | [Optional[shared.CreateAccountResponse]](../../models/shared/createaccountresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createbankaccountresponse.md b/previous-versions/accounting/docs/models/operations/createbankaccountresponse.md index f5e4033f2..6c9e15a75 100755 --- a/previous-versions/accounting/docs/models/operations/createbankaccountresponse.md +++ b/previous-versions/accounting/docs/models/operations/createbankaccountresponse.md @@ -7,6 +7,6 @@ | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_bank_account_response` | [Optional[shared.CreateBankAccountResponse]](../../models/shared/createbankaccountresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createbanktransactionsresponse.md b/previous-versions/accounting/docs/models/operations/createbanktransactionsresponse.md index c562c481d..883079e7f 100755 --- a/previous-versions/accounting/docs/models/operations/createbanktransactionsresponse.md +++ b/previous-versions/accounting/docs/models/operations/createbanktransactionsresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_bank_transactions_response` | [Optional[shared.CreateBankTransactionsResponse]](../../models/shared/createbanktransactionsresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createbillcreditnoteresponse.md b/previous-versions/accounting/docs/models/operations/createbillcreditnoteresponse.md index fab5ca63a..8621d1a49 100755 --- a/previous-versions/accounting/docs/models/operations/createbillcreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/operations/createbillcreditnoteresponse.md @@ -7,6 +7,6 @@ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_bill_credit_note_response` | [Optional[shared.CreateBillCreditNoteResponse]](../../models/shared/createbillcreditnoteresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createbillpaymentresponse.md b/previous-versions/accounting/docs/models/operations/createbillpaymentresponse.md index f7a941c6d..400ee9f0a 100755 --- a/previous-versions/accounting/docs/models/operations/createbillpaymentresponse.md +++ b/previous-versions/accounting/docs/models/operations/createbillpaymentresponse.md @@ -7,6 +7,6 @@ | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_bill_payment_response` | [Optional[shared.CreateBillPaymentResponse]](../../models/shared/createbillpaymentresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createbillresponse.md b/previous-versions/accounting/docs/models/operations/createbillresponse.md index b4afd67a7..d67e1ae4c 100755 --- a/previous-versions/accounting/docs/models/operations/createbillresponse.md +++ b/previous-versions/accounting/docs/models/operations/createbillresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_bill_response` | [Optional[shared.CreateBillResponse]](../../models/shared/createbillresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createcreditnoteresponse.md b/previous-versions/accounting/docs/models/operations/createcreditnoteresponse.md index f196e00fb..f2c81e8af 100755 --- a/previous-versions/accounting/docs/models/operations/createcreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/operations/createcreditnoteresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_credit_note_response` | [Optional[shared.CreateCreditNoteResponse]](../../models/shared/createcreditnoteresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createcustomerresponse.md b/previous-versions/accounting/docs/models/operations/createcustomerresponse.md index 78c6d400c..01e3615d3 100755 --- a/previous-versions/accounting/docs/models/operations/createcustomerresponse.md +++ b/previous-versions/accounting/docs/models/operations/createcustomerresponse.md @@ -7,6 +7,6 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_customer_response` | [Optional[shared.CreateCustomerResponse]](../../models/shared/createcustomerresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createdirectcostresponse.md b/previous-versions/accounting/docs/models/operations/createdirectcostresponse.md index 0e3cdbc8e..8785eb0f5 100755 --- a/previous-versions/accounting/docs/models/operations/createdirectcostresponse.md +++ b/previous-versions/accounting/docs/models/operations/createdirectcostresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_direct_cost_response` | [Optional[shared.CreateDirectCostResponse]](../../models/shared/createdirectcostresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createdirectincomeresponse.md b/previous-versions/accounting/docs/models/operations/createdirectincomeresponse.md index 4761001ea..c8e1b02f5 100755 --- a/previous-versions/accounting/docs/models/operations/createdirectincomeresponse.md +++ b/previous-versions/accounting/docs/models/operations/createdirectincomeresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_direct_income_response` | [Optional[shared.CreateDirectIncomeResponse]](../../models/shared/createdirectincomeresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createinvoiceresponse.md b/previous-versions/accounting/docs/models/operations/createinvoiceresponse.md index 78dca5af2..e1bcb78c4 100755 --- a/previous-versions/accounting/docs/models/operations/createinvoiceresponse.md +++ b/previous-versions/accounting/docs/models/operations/createinvoiceresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_invoice_response` | [Optional[shared.CreateInvoiceResponse]](../../models/shared/createinvoiceresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createitemresponse.md b/previous-versions/accounting/docs/models/operations/createitemresponse.md index 7b7e93c3d..10e435b55 100755 --- a/previous-versions/accounting/docs/models/operations/createitemresponse.md +++ b/previous-versions/accounting/docs/models/operations/createitemresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_item_response` | [Optional[shared.CreateItemResponse]](../../models/shared/createitemresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createjournalentryresponse.md b/previous-versions/accounting/docs/models/operations/createjournalentryresponse.md index 979c5c2e3..959a2f902 100755 --- a/previous-versions/accounting/docs/models/operations/createjournalentryresponse.md +++ b/previous-versions/accounting/docs/models/operations/createjournalentryresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_journal_entry_response` | [Optional[shared.CreateJournalEntryResponse]](../../models/shared/createjournalentryresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createjournalresponse.md b/previous-versions/accounting/docs/models/operations/createjournalresponse.md index 91587a7c6..f3a82d4d0 100755 --- a/previous-versions/accounting/docs/models/operations/createjournalresponse.md +++ b/previous-versions/accounting/docs/models/operations/createjournalresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_journal_response` | [Optional[shared.CreateJournalResponse]](../../models/shared/createjournalresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createpaymentresponse.md b/previous-versions/accounting/docs/models/operations/createpaymentresponse.md index 6f6013ede..89ce3dede 100755 --- a/previous-versions/accounting/docs/models/operations/createpaymentresponse.md +++ b/previous-versions/accounting/docs/models/operations/createpaymentresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_payment_response` | [Optional[shared.CreatePaymentResponse]](../../models/shared/createpaymentresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createpurchaseorderresponse.md b/previous-versions/accounting/docs/models/operations/createpurchaseorderresponse.md index 9e21e7517..1430fa5b5 100755 --- a/previous-versions/accounting/docs/models/operations/createpurchaseorderresponse.md +++ b/previous-versions/accounting/docs/models/operations/createpurchaseorderresponse.md @@ -7,6 +7,6 @@ | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_purchase_order_response` | [Optional[shared.CreatePurchaseOrderResponse]](../../models/shared/createpurchaseorderresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createsupplierresponse.md b/previous-versions/accounting/docs/models/operations/createsupplierresponse.md index 64c4f07e1..499202b3b 100755 --- a/previous-versions/accounting/docs/models/operations/createsupplierresponse.md +++ b/previous-versions/accounting/docs/models/operations/createsupplierresponse.md @@ -7,6 +7,6 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_supplier_response` | [Optional[shared.CreateSupplierResponse]](../../models/shared/createsupplierresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/createtransferresponse.md b/previous-versions/accounting/docs/models/operations/createtransferresponse.md index 50927e483..4ce7425de 100755 --- a/previous-versions/accounting/docs/models/operations/createtransferresponse.md +++ b/previous-versions/accounting/docs/models/operations/createtransferresponse.md @@ -7,6 +7,6 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `create_transfer_response` | [Optional[shared.CreateTransferResponse]](../../models/shared/createtransferresponse.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/deletebillpaymentresponse.md b/previous-versions/accounting/docs/models/operations/deletebillpaymentresponse.md index abe05e1ce..16627e53c 100755 --- a/previous-versions/accounting/docs/models/operations/deletebillpaymentresponse.md +++ b/previous-versions/accounting/docs/models/operations/deletebillpaymentresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_operation_summary` | [Optional[shared.PushOperationSummary]](../../models/shared/pushoperationsummary.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/deletebillresponse.md b/previous-versions/accounting/docs/models/operations/deletebillresponse.md index 93cf0c86d..87f9a0841 100755 --- a/previous-versions/accounting/docs/models/operations/deletebillresponse.md +++ b/previous-versions/accounting/docs/models/operations/deletebillresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_operation_summary` | [Optional[shared.PushOperationSummary]](../../models/shared/pushoperationsummary.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/deleteinvoiceresponse.md b/previous-versions/accounting/docs/models/operations/deleteinvoiceresponse.md index 2e4e11dc9..17f013c90 100755 --- a/previous-versions/accounting/docs/models/operations/deleteinvoiceresponse.md +++ b/previous-versions/accounting/docs/models/operations/deleteinvoiceresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_operation_summary` | [Optional[shared.PushOperationSummary]](../../models/shared/pushoperationsummary.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/deletejournalentryresponse.md b/previous-versions/accounting/docs/models/operations/deletejournalentryresponse.md index 85b0f603e..c231be506 100755 --- a/previous-versions/accounting/docs/models/operations/deletejournalentryresponse.md +++ b/previous-versions/accounting/docs/models/operations/deletejournalentryresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_operation_summary` | [Optional[shared.PushOperationSummary]](../../models/shared/pushoperationsummary.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/downloadbillattachmentresponse.md b/previous-versions/accounting/docs/models/operations/downloadbillattachmentresponse.md index 877f3fbd8..1a5b512ba 100755 --- a/previous-versions/accounting/docs/models/operations/downloadbillattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/downloadbillattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `data` | *Optional[bytes]* | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/downloadcustomerattachmentresponse.md b/previous-versions/accounting/docs/models/operations/downloadcustomerattachmentresponse.md index 070b78d08..b11829c31 100755 --- a/previous-versions/accounting/docs/models/operations/downloadcustomerattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/downloadcustomerattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `data` | *Optional[bytes]* | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/downloaddirectcostattachmentresponse.md b/previous-versions/accounting/docs/models/operations/downloaddirectcostattachmentresponse.md index 101ecbab9..dee542f23 100755 --- a/previous-versions/accounting/docs/models/operations/downloaddirectcostattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/downloaddirectcostattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `data` | *Optional[bytes]* | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/downloaddirectincomeattachmentresponse.md b/previous-versions/accounting/docs/models/operations/downloaddirectincomeattachmentresponse.md index 27af87985..f63da4e39 100755 --- a/previous-versions/accounting/docs/models/operations/downloaddirectincomeattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/downloaddirectincomeattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `data` | *Optional[bytes]* | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/downloadinvoiceattachmentresponse.md b/previous-versions/accounting/docs/models/operations/downloadinvoiceattachmentresponse.md index 0bcb013cf..b4f54feb1 100755 --- a/previous-versions/accounting/docs/models/operations/downloadinvoiceattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/downloadinvoiceattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `data` | *Optional[bytes]* | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/downloadsupplierattachmentresponse.md b/previous-versions/accounting/docs/models/operations/downloadsupplierattachmentresponse.md index 2d49a2120..2e34a0f92 100755 --- a/previous-versions/accounting/docs/models/operations/downloadsupplierattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/downloadsupplierattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `data` | *Optional[bytes]* | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getaccount409applicationjson.md b/previous-versions/accounting/docs/models/operations/getaccount409applicationjson.md deleted file mode 100755 index e9b54b653..000000000 --- a/previous-versions/accounting/docs/models/operations/getaccount409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetAccount409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getaccountresponse.md b/previous-versions/accounting/docs/models/operations/getaccountresponse.md index 137a787ec..b9f53ec86 100755 --- a/previous-versions/accounting/docs/models/operations/getaccountresponse.md +++ b/previous-versions/accounting/docs/models/operations/getaccountresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `account` | [Optional[shared.Account]](../../models/shared/account.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_account_409_application_json_object` | [Optional[GetAccount409ApplicationJSON]](../../models/operations/getaccount409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `account` | [Optional[shared.Account]](../../models/shared/account.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getaccounttransaction409applicationjson.md b/previous-versions/accounting/docs/models/operations/getaccounttransaction409applicationjson.md deleted file mode 100755 index 5087035c4..000000000 --- a/previous-versions/accounting/docs/models/operations/getaccounttransaction409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetAccountTransaction409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getaccounttransactionresponse.md b/previous-versions/accounting/docs/models/operations/getaccounttransactionresponse.md index 3d5d3cfec..13eb6fe7c 100755 --- a/previous-versions/accounting/docs/models/operations/getaccounttransactionresponse.md +++ b/previous-versions/accounting/docs/models/operations/getaccounttransactionresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `account_transaction` | [Optional[shared.AccountTransaction]](../../models/shared/accounttransaction.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_account_transaction_409_application_json_object` | [Optional[GetAccountTransaction409ApplicationJSON]](../../models/operations/getaccounttransaction409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `account_transaction` | [Optional[shared.AccountTransaction]](../../models/shared/accounttransaction.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getagedcreditorsreportresponse.md b/previous-versions/accounting/docs/models/operations/getagedcreditorsreportresponse.md index 7dbf328e1..2d3ccdcf3 100755 --- a/previous-versions/accounting/docs/models/operations/getagedcreditorsreportresponse.md +++ b/previous-versions/accounting/docs/models/operations/getagedcreditorsreportresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `aged_creditor_report` | [Optional[shared.AgedCreditorReport]](../../models/shared/agedcreditorreport.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getageddebtorsreportresponse.md b/previous-versions/accounting/docs/models/operations/getageddebtorsreportresponse.md index f071352af..a17fc1841 100755 --- a/previous-versions/accounting/docs/models/operations/getageddebtorsreportresponse.md +++ b/previous-versions/accounting/docs/models/operations/getageddebtorsreportresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `aged_debtor_report` | [Optional[shared.AgedDebtorReport]](../../models/shared/ageddebtorreport.md) | :heavy_minus_sign: | OK | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbalancesheet409applicationjson.md b/previous-versions/accounting/docs/models/operations/getbalancesheet409applicationjson.md deleted file mode 100755 index 534f94447..000000000 --- a/previous-versions/accounting/docs/models/operations/getbalancesheet409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetBalanceSheet409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbalancesheetresponse.md b/previous-versions/accounting/docs/models/operations/getbalancesheetresponse.md index b9b0ae0dc..f66ebc4dc 100755 --- a/previous-versions/accounting/docs/models/operations/getbalancesheetresponse.md +++ b/previous-versions/accounting/docs/models/operations/getbalancesheetresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `balance_sheet` | [Optional[shared.BalanceSheet1]](../../models/shared/balancesheet1.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_balance_sheet_409_application_json_object` | [Optional[GetBalanceSheet409ApplicationJSON]](../../models/operations/getbalancesheet409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `balance_sheet` | [Optional[shared.BalanceSheet1]](../../models/shared/balancesheet1.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbankaccount409applicationjson.md b/previous-versions/accounting/docs/models/operations/getbankaccount409applicationjson.md deleted file mode 100755 index ea6d7f7d9..000000000 --- a/previous-versions/accounting/docs/models/operations/getbankaccount409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetBankAccount409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbankaccountresponse.md b/previous-versions/accounting/docs/models/operations/getbankaccountresponse.md index 6f4d6956f..c65d5cb9b 100755 --- a/previous-versions/accounting/docs/models/operations/getbankaccountresponse.md +++ b/previous-versions/accounting/docs/models/operations/getbankaccountresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `bank_account` | [Optional[shared.BankAccount]](../../models/shared/bankaccount.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_bank_account_409_application_json_object` | [Optional[GetBankAccount409ApplicationJSON]](../../models/operations/getbankaccount409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bank_account` | [Optional[shared.BankAccount]](../../models/shared/bankaccount.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbill409applicationjson.md b/previous-versions/accounting/docs/models/operations/getbill409applicationjson.md deleted file mode 100755 index 3adbbf0e1..000000000 --- a/previous-versions/accounting/docs/models/operations/getbill409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetBill409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbillattachmentresponse.md b/previous-versions/accounting/docs/models/operations/getbillattachmentresponse.md index 6a4b5d454..b6a56c06c 100755 --- a/previous-versions/accounting/docs/models/operations/getbillattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/getbillattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachment` | [Optional[shared.Attachment]](../../models/shared/attachment.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbillcreditnote409applicationjson.md b/previous-versions/accounting/docs/models/operations/getbillcreditnote409applicationjson.md deleted file mode 100755 index 617338991..000000000 --- a/previous-versions/accounting/docs/models/operations/getbillcreditnote409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetBillCreditNote409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbillcreditnoteresponse.md b/previous-versions/accounting/docs/models/operations/getbillcreditnoteresponse.md index 1fbe6806f..7afbe9ee7 100755 --- a/previous-versions/accounting/docs/models/operations/getbillcreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/operations/getbillcreditnoteresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `bill_credit_note` | [Optional[shared.BillCreditNote]](../../models/shared/billcreditnote.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_bill_credit_note_409_application_json_object` | [Optional[GetBillCreditNote409ApplicationJSON]](../../models/operations/getbillcreditnote409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bill_credit_note` | [Optional[shared.BillCreditNote]](../../models/shared/billcreditnote.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbillpayments409applicationjson.md b/previous-versions/accounting/docs/models/operations/getbillpayments409applicationjson.md deleted file mode 100755 index a7cd4d256..000000000 --- a/previous-versions/accounting/docs/models/operations/getbillpayments409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetBillPayments409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbillpaymentsresponse.md b/previous-versions/accounting/docs/models/operations/getbillpaymentsresponse.md index 3c5f8066a..d2cb02105 100755 --- a/previous-versions/accounting/docs/models/operations/getbillpaymentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/getbillpaymentsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `bill_payment` | [Optional[shared.BillPayment]](../../models/shared/billpayment.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_bill_payments_409_application_json_object` | [Optional[GetBillPayments409ApplicationJSON]](../../models/operations/getbillpayments409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bill_payment` | [Optional[shared.BillPayment]](../../models/shared/billpayment.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getbillresponse.md b/previous-versions/accounting/docs/models/operations/getbillresponse.md index 7000a6c69..7d1fffeab 100755 --- a/previous-versions/accounting/docs/models/operations/getbillresponse.md +++ b/previous-versions/accounting/docs/models/operations/getbillresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `bill` | [Optional[shared.Bill]](../../models/shared/bill.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_bill_409_application_json_object` | [Optional[GetBill409ApplicationJSON]](../../models/operations/getbill409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bill` | [Optional[shared.Bill]](../../models/shared/bill.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcashflowstatement409applicationjson.md b/previous-versions/accounting/docs/models/operations/getcashflowstatement409applicationjson.md deleted file mode 100755 index 290018a94..000000000 --- a/previous-versions/accounting/docs/models/operations/getcashflowstatement409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetCashFlowStatement409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcashflowstatementresponse.md b/previous-versions/accounting/docs/models/operations/getcashflowstatementresponse.md index 105aa0749..f74f93745 100755 --- a/previous-versions/accounting/docs/models/operations/getcashflowstatementresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcashflowstatementresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `cash_flow_statement` | [Optional[shared.CashFlowStatement1]](../../models/shared/cashflowstatement1.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_cash_flow_statement_409_application_json_object` | [Optional[GetCashFlowStatement409ApplicationJSON]](../../models/operations/getcashflowstatement409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `cash_flow_statement` | [Optional[shared.CashFlowStatement1]](../../models/shared/cashflowstatement1.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcompanyinfo409applicationjson.md b/previous-versions/accounting/docs/models/operations/getcompanyinfo409applicationjson.md deleted file mode 100755 index 245a37899..000000000 --- a/previous-versions/accounting/docs/models/operations/getcompanyinfo409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetCompanyInfo409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcompanyinforesponse.md b/previous-versions/accounting/docs/models/operations/getcompanyinforesponse.md index 78fba8ba9..ba41bca49 100755 --- a/previous-versions/accounting/docs/models/operations/getcompanyinforesponse.md +++ b/previous-versions/accounting/docs/models/operations/getcompanyinforesponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `company_dataset` | [Optional[shared.CompanyDataset]](../../models/shared/companydataset.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_company_info_409_application_json_object` | [Optional[GetCompanyInfo409ApplicationJSON]](../../models/operations/getcompanyinfo409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `company_dataset` | [Optional[shared.CompanyDataset]](../../models/shared/companydataset.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatebanktransactionsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatebanktransactionsmodelresponse.md index ae35274f0..75f704cd8 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatebanktransactionsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatebanktransactionsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | Success | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatebillpaymentsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatebillpaymentsmodelresponse.md index e3a58cb3c..ae21fd525 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatebillpaymentsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatebillpaymentsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatechartofaccountsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatechartofaccountsmodelresponse.md index 65a671e1e..9bb2dc1bd 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatechartofaccountsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatechartofaccountsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatedirectcostsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatedirectcostsmodelresponse.md index 63a511e94..e7985814c 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatedirectcostsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatedirectcostsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatedirectincomesmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatedirectincomesmodelresponse.md index fc0c8366f..12f17895f 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatedirectincomesmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatedirectincomesmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateitemsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateitemsmodelresponse.md index 7cb6fb7b6..b21f295fa 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateitemsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateitemsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatejournalentriesmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatejournalentriesmodelresponse.md index cf8e6a008..55923994c 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatejournalentriesmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatejournalentriesmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatejournalsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatejournalsmodelresponse.md index eb4dd3a06..7709dbd97 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatejournalsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatejournalsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatepaymentsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatepaymentsmodelresponse.md index c5561858e..81365ad09 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatepaymentsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatepaymentsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreatetransfersmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreatetransfersmodelresponse.md index 5f1334d13..6140d47c0 100755 --- a/previous-versions/accounting/docs/models/operations/getcreatetransfersmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreatetransfersmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateupdatebankaccountsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateupdatebankaccountsmodelresponse.md index 299f66989..ed4d32bfd 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateupdatebankaccountsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateupdatebankaccountsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateupdatebillcreditnotesmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateupdatebillcreditnotesmodelresponse.md index 9b8b0fbca..fc54148da 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateupdatebillcreditnotesmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateupdatebillcreditnotesmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateupdatebillsmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateupdatebillsmodelresponse.md index ccf3f50f3..b6b28c1fd 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateupdatebillsmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateupdatebillsmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateupdatecreditnotesmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateupdatecreditnotesmodelresponse.md index 5093e6698..81033b9e4 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateupdatecreditnotesmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateupdatecreditnotesmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateupdatecustomersmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateupdatecustomersmodelresponse.md index 48fd50247..763251123 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateupdatecustomersmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateupdatecustomersmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateupdateinvoicesmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateupdateinvoicesmodelresponse.md index 8d56e9227..1c3e55f4c 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateupdateinvoicesmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateupdateinvoicesmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateupdatepurchaseordersmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateupdatepurchaseordersmodelresponse.md index 3f4acce43..4656f03b1 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateupdatepurchaseordersmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateupdatepurchaseordersmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreateupdatesuppliersmodelresponse.md b/previous-versions/accounting/docs/models/operations/getcreateupdatesuppliersmodelresponse.md index 4d7c50b08..cf4f8940f 100755 --- a/previous-versions/accounting/docs/models/operations/getcreateupdatesuppliersmodelresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreateupdatesuppliersmodelresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `push_option` | [Optional[shared.PushOption]](../../models/shared/pushoption.md) | :heavy_minus_sign: | OK | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreditnote409applicationjson.md b/previous-versions/accounting/docs/models/operations/getcreditnote409applicationjson.md deleted file mode 100755 index 1aeed5eb7..000000000 --- a/previous-versions/accounting/docs/models/operations/getcreditnote409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetCreditNote409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcreditnoteresponse.md b/previous-versions/accounting/docs/models/operations/getcreditnoteresponse.md index 917eab530..0862354a2 100755 --- a/previous-versions/accounting/docs/models/operations/getcreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcreditnoteresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `credit_note` | [Optional[shared.CreditNote]](../../models/shared/creditnote.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_credit_note_409_application_json_object` | [Optional[GetCreditNote409ApplicationJSON]](../../models/operations/getcreditnote409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `credit_note` | [Optional[shared.CreditNote]](../../models/shared/creditnote.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcustomer409applicationjson.md b/previous-versions/accounting/docs/models/operations/getcustomer409applicationjson.md deleted file mode 100755 index 9f87475e0..000000000 --- a/previous-versions/accounting/docs/models/operations/getcustomer409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetCustomer409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcustomerattachmentresponse.md b/previous-versions/accounting/docs/models/operations/getcustomerattachmentresponse.md index a65f03479..822e19e52 100755 --- a/previous-versions/accounting/docs/models/operations/getcustomerattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcustomerattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachment` | [Optional[shared.Attachment]](../../models/shared/attachment.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getcustomerresponse.md b/previous-versions/accounting/docs/models/operations/getcustomerresponse.md index 25192b88e..2cf1387e8 100755 --- a/previous-versions/accounting/docs/models/operations/getcustomerresponse.md +++ b/previous-versions/accounting/docs/models/operations/getcustomerresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `customer` | [Optional[shared.Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_customer_409_application_json_object` | [Optional[GetCustomer409ApplicationJSON]](../../models/operations/getcustomer409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `customer` | [Optional[shared.Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getdirectcost409applicationjson.md b/previous-versions/accounting/docs/models/operations/getdirectcost409applicationjson.md deleted file mode 100755 index 071b5bea7..000000000 --- a/previous-versions/accounting/docs/models/operations/getdirectcost409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetDirectCost409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getdirectcostattachmentresponse.md b/previous-versions/accounting/docs/models/operations/getdirectcostattachmentresponse.md index 475a61c48..448ad33e6 100755 --- a/previous-versions/accounting/docs/models/operations/getdirectcostattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/getdirectcostattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachment` | [Optional[shared.Attachment]](../../models/shared/attachment.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getdirectcostresponse.md b/previous-versions/accounting/docs/models/operations/getdirectcostresponse.md index 20b0af832..b505bfb69 100755 --- a/previous-versions/accounting/docs/models/operations/getdirectcostresponse.md +++ b/previous-versions/accounting/docs/models/operations/getdirectcostresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `direct_cost` | [Optional[shared.DirectCost]](../../models/shared/directcost.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_direct_cost_409_application_json_object` | [Optional[GetDirectCost409ApplicationJSON]](../../models/operations/getdirectcost409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `direct_cost` | [Optional[shared.DirectCost]](../../models/shared/directcost.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getdirectincome409applicationjson.md b/previous-versions/accounting/docs/models/operations/getdirectincome409applicationjson.md deleted file mode 100755 index 2e0212e4d..000000000 --- a/previous-versions/accounting/docs/models/operations/getdirectincome409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetDirectIncome409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getdirectincomeattachmentresponse.md b/previous-versions/accounting/docs/models/operations/getdirectincomeattachmentresponse.md index 6bc2cfd12..75ea2dac0 100755 --- a/previous-versions/accounting/docs/models/operations/getdirectincomeattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/getdirectincomeattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachment` | [Optional[shared.Attachment]](../../models/shared/attachment.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getdirectincomeresponse.md b/previous-versions/accounting/docs/models/operations/getdirectincomeresponse.md index 0906e4b22..12eeb6cf7 100755 --- a/previous-versions/accounting/docs/models/operations/getdirectincomeresponse.md +++ b/previous-versions/accounting/docs/models/operations/getdirectincomeresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `direct_income` | [Optional[shared.DirectIncome]](../../models/shared/directincome.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_direct_income_409_application_json_object` | [Optional[GetDirectIncome409ApplicationJSON]](../../models/operations/getdirectincome409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `direct_income` | [Optional[shared.DirectIncome]](../../models/shared/directincome.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getinvoice409applicationjson.md b/previous-versions/accounting/docs/models/operations/getinvoice409applicationjson.md deleted file mode 100755 index ec0db58d0..000000000 --- a/previous-versions/accounting/docs/models/operations/getinvoice409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetInvoice409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getinvoiceattachmentresponse.md b/previous-versions/accounting/docs/models/operations/getinvoiceattachmentresponse.md index 8dd3559ed..6831f8483 100755 --- a/previous-versions/accounting/docs/models/operations/getinvoiceattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/getinvoiceattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachment` | [Optional[shared.Attachment]](../../models/shared/attachment.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getinvoiceresponse.md b/previous-versions/accounting/docs/models/operations/getinvoiceresponse.md index f53a379dd..1a9c4e6b9 100755 --- a/previous-versions/accounting/docs/models/operations/getinvoiceresponse.md +++ b/previous-versions/accounting/docs/models/operations/getinvoiceresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `invoice` | [Optional[shared.Invoice]](../../models/shared/invoice.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_invoice_409_application_json_object` | [Optional[GetInvoice409ApplicationJSON]](../../models/operations/getinvoice409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `invoice` | [Optional[shared.Invoice]](../../models/shared/invoice.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getitem409applicationjson.md b/previous-versions/accounting/docs/models/operations/getitem409applicationjson.md deleted file mode 100755 index 4cf2d68ad..000000000 --- a/previous-versions/accounting/docs/models/operations/getitem409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetItem409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getitemresponse.md b/previous-versions/accounting/docs/models/operations/getitemresponse.md index 84970e17c..4013f3898 100755 --- a/previous-versions/accounting/docs/models/operations/getitemresponse.md +++ b/previous-versions/accounting/docs/models/operations/getitemresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `item` | [Optional[shared.Item]](../../models/shared/item.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_item_409_application_json_object` | [Optional[GetItem409ApplicationJSON]](../../models/operations/getitem409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `item` | [Optional[shared.Item]](../../models/shared/item.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getjournal409applicationjson.md b/previous-versions/accounting/docs/models/operations/getjournal409applicationjson.md deleted file mode 100755 index 3fa4d0b3e..000000000 --- a/previous-versions/accounting/docs/models/operations/getjournal409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetJournal409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getjournalentry409applicationjson.md b/previous-versions/accounting/docs/models/operations/getjournalentry409applicationjson.md deleted file mode 100755 index adb27aa8d..000000000 --- a/previous-versions/accounting/docs/models/operations/getjournalentry409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetJournalEntry409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getjournalentryresponse.md b/previous-versions/accounting/docs/models/operations/getjournalentryresponse.md index 7f7c9ab82..be110f716 100755 --- a/previous-versions/accounting/docs/models/operations/getjournalentryresponse.md +++ b/previous-versions/accounting/docs/models/operations/getjournalentryresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `journal_entry` | [Optional[shared.JournalEntry]](../../models/shared/journalentry.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_journal_entry_409_application_json_object` | [Optional[GetJournalEntry409ApplicationJSON]](../../models/operations/getjournalentry409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `journal_entry` | [Optional[shared.JournalEntry]](../../models/shared/journalentry.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getjournalresponse.md b/previous-versions/accounting/docs/models/operations/getjournalresponse.md index ed93a8a14..ca7114ac5 100755 --- a/previous-versions/accounting/docs/models/operations/getjournalresponse.md +++ b/previous-versions/accounting/docs/models/operations/getjournalresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `journal` | [Optional[shared.Journal]](../../models/shared/journal.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_journal_409_application_json_object` | [Optional[GetJournal409ApplicationJSON]](../../models/operations/getjournal409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `journal` | [Optional[shared.Journal]](../../models/shared/journal.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getpayment409applicationjson.md b/previous-versions/accounting/docs/models/operations/getpayment409applicationjson.md deleted file mode 100755 index 957796d64..000000000 --- a/previous-versions/accounting/docs/models/operations/getpayment409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetPayment409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getpaymentmethod409applicationjson.md b/previous-versions/accounting/docs/models/operations/getpaymentmethod409applicationjson.md deleted file mode 100755 index 94011857c..000000000 --- a/previous-versions/accounting/docs/models/operations/getpaymentmethod409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetPaymentMethod409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getpaymentmethodresponse.md b/previous-versions/accounting/docs/models/operations/getpaymentmethodresponse.md index d8c7caa46..0f3212bd0 100755 --- a/previous-versions/accounting/docs/models/operations/getpaymentmethodresponse.md +++ b/previous-versions/accounting/docs/models/operations/getpaymentmethodresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `payment_method` | [Optional[shared.PaymentMethod]](../../models/shared/paymentmethod.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_payment_method_409_application_json_object` | [Optional[GetPaymentMethod409ApplicationJSON]](../../models/operations/getpaymentmethod409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `payment_method` | [Optional[shared.PaymentMethod]](../../models/shared/paymentmethod.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getpaymentresponse.md b/previous-versions/accounting/docs/models/operations/getpaymentresponse.md index b9fd555e8..9a4997ebd 100755 --- a/previous-versions/accounting/docs/models/operations/getpaymentresponse.md +++ b/previous-versions/accounting/docs/models/operations/getpaymentresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `payment` | [Optional[shared.Payment]](../../models/shared/payment.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_payment_409_application_json_object` | [Optional[GetPayment409ApplicationJSON]](../../models/operations/getpayment409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `payment` | [Optional[shared.Payment]](../../models/shared/payment.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getprofitandloss409applicationjson.md b/previous-versions/accounting/docs/models/operations/getprofitandloss409applicationjson.md deleted file mode 100755 index 094166d0f..000000000 --- a/previous-versions/accounting/docs/models/operations/getprofitandloss409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetProfitAndLoss409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getprofitandlossresponse.md b/previous-versions/accounting/docs/models/operations/getprofitandlossresponse.md index 6f602f82d..054cb2d4c 100755 --- a/previous-versions/accounting/docs/models/operations/getprofitandlossresponse.md +++ b/previous-versions/accounting/docs/models/operations/getprofitandlossresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `profit_and_loss_report` | [Optional[shared.ProfitAndLossReport1]](../../models/shared/profitandlossreport1.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_profit_and_loss_409_application_json_object` | [Optional[GetProfitAndLoss409ApplicationJSON]](../../models/operations/getprofitandloss409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `profit_and_loss_report` | [Optional[shared.ProfitAndLossReport1]](../../models/shared/profitandlossreport1.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getpurchaseorder409applicationjson.md b/previous-versions/accounting/docs/models/operations/getpurchaseorder409applicationjson.md deleted file mode 100755 index dfc8471b6..000000000 --- a/previous-versions/accounting/docs/models/operations/getpurchaseorder409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetPurchaseOrder409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getpurchaseorderresponse.md b/previous-versions/accounting/docs/models/operations/getpurchaseorderresponse.md index d60515f3c..a05127fa8 100755 --- a/previous-versions/accounting/docs/models/operations/getpurchaseorderresponse.md +++ b/previous-versions/accounting/docs/models/operations/getpurchaseorderresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `purchase_order` | [Optional[shared.PurchaseOrder]](../../models/shared/purchaseorder.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_purchase_order_409_application_json_object` | [Optional[GetPurchaseOrder409ApplicationJSON]](../../models/operations/getpurchaseorder409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `purchase_order` | [Optional[shared.PurchaseOrder]](../../models/shared/purchaseorder.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getsalesorder409applicationjson.md b/previous-versions/accounting/docs/models/operations/getsalesorder409applicationjson.md deleted file mode 100755 index 5f93f621f..000000000 --- a/previous-versions/accounting/docs/models/operations/getsalesorder409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetSalesOrder409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getsalesorderresponse.md b/previous-versions/accounting/docs/models/operations/getsalesorderresponse.md index 0a4bc5ec9..36b1d8d1c 100755 --- a/previous-versions/accounting/docs/models/operations/getsalesorderresponse.md +++ b/previous-versions/accounting/docs/models/operations/getsalesorderresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `sales_order` | [Optional[shared.SalesOrder]](../../models/shared/salesorder.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `get_sales_order_409_application_json_object` | [Optional[GetSalesOrder409ApplicationJSON]](../../models/operations/getsalesorder409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `sales_order` | [Optional[shared.SalesOrder]](../../models/shared/salesorder.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getsupplier409applicationjson.md b/previous-versions/accounting/docs/models/operations/getsupplier409applicationjson.md deleted file mode 100755 index e0485cabe..000000000 --- a/previous-versions/accounting/docs/models/operations/getsupplier409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetSupplier409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getsupplierattachmentresponse.md b/previous-versions/accounting/docs/models/operations/getsupplierattachmentresponse.md index 3b0b17614..7a5b4bf1e 100755 --- a/previous-versions/accounting/docs/models/operations/getsupplierattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/getsupplierattachmentresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachment` | [Optional[shared.Attachment]](../../models/shared/attachment.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/getsupplierresponse.md b/previous-versions/accounting/docs/models/operations/getsupplierresponse.md index 8881d49df..298bff3cb 100755 --- a/previous-versions/accounting/docs/models/operations/getsupplierresponse.md +++ b/previous-versions/accounting/docs/models/operations/getsupplierresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `supplier` | [Optional[shared.Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | Success | -| `get_supplier_409_application_json_object` | [Optional[GetSupplier409ApplicationJSON]](../../models/operations/getsupplier409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | +| `supplier` | [Optional[shared.Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/gettaxrate409applicationjson.md b/previous-versions/accounting/docs/models/operations/gettaxrate409applicationjson.md deleted file mode 100755 index 4c1f9694e..000000000 --- a/previous-versions/accounting/docs/models/operations/gettaxrate409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetTaxRate409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/gettaxrateresponse.md b/previous-versions/accounting/docs/models/operations/gettaxrateresponse.md index 784c07309..85a7ab052 100755 --- a/previous-versions/accounting/docs/models/operations/gettaxrateresponse.md +++ b/previous-versions/accounting/docs/models/operations/gettaxrateresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `tax_rate` | [Optional[shared.TaxRate]](../../models/shared/taxrate.md) | :heavy_minus_sign: | Success | -| `get_tax_rate_409_application_json_object` | [Optional[GetTaxRate409ApplicationJSON]](../../models/operations/gettaxrate409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | +| `tax_rate` | [Optional[shared.TaxRate]](../../models/shared/taxrate.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/gettrackingcategory409applicationjson.md b/previous-versions/accounting/docs/models/operations/gettrackingcategory409applicationjson.md deleted file mode 100755 index 4b0a4e9b1..000000000 --- a/previous-versions/accounting/docs/models/operations/gettrackingcategory409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetTrackingCategory409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/gettrackingcategoryresponse.md b/previous-versions/accounting/docs/models/operations/gettrackingcategoryresponse.md index 074b46170..90d35c4e0 100755 --- a/previous-versions/accounting/docs/models/operations/gettrackingcategoryresponse.md +++ b/previous-versions/accounting/docs/models/operations/gettrackingcategoryresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `tracking_category_tree` | [Optional[shared.TrackingCategoryTree]](../../models/shared/trackingcategorytree.md) | :heavy_minus_sign: | Success | -| `get_tracking_category_409_application_json_object` | [Optional[GetTrackingCategory409ApplicationJSON]](../../models/operations/gettrackingcategory409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | +| `tracking_category_tree` | [Optional[shared.TrackingCategoryTree]](../../models/shared/trackingcategorytree.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/gettransfer409applicationjson.md b/previous-versions/accounting/docs/models/operations/gettransfer409applicationjson.md deleted file mode 100755 index 12702ccd0..000000000 --- a/previous-versions/accounting/docs/models/operations/gettransfer409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetTransfer409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/gettransferresponse.md b/previous-versions/accounting/docs/models/operations/gettransferresponse.md index d1a16f52f..ba3c854c7 100755 --- a/previous-versions/accounting/docs/models/operations/gettransferresponse.md +++ b/previous-versions/accounting/docs/models/operations/gettransferresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `transfer` | [Optional[shared.Transfer]](../../models/shared/transfer.md) | :heavy_minus_sign: | Success | -| `get_transfer_409_application_json_object` | [Optional[GetTransfer409ApplicationJSON]](../../models/operations/gettransfer409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | +| `transfer` | [Optional[shared.Transfer]](../../models/shared/transfer.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listaccounts409applicationjson.md b/previous-versions/accounting/docs/models/operations/listaccounts409applicationjson.md deleted file mode 100755 index 5e70b9076..000000000 --- a/previous-versions/accounting/docs/models/operations/listaccounts409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListAccounts409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listaccountsresponse.md b/previous-versions/accounting/docs/models/operations/listaccountsresponse.md index 8e815337e..9f8e57872 100755 --- a/previous-versions/accounting/docs/models/operations/listaccountsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listaccountsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `accounts` | [Optional[shared.Accounts]](../../models/shared/accounts.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_accounts_409_application_json_object` | [Optional[ListAccounts409ApplicationJSON]](../../models/operations/listaccounts409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `accounts` | [Optional[shared.Accounts]](../../models/shared/accounts.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listaccounttransactions409applicationjson.md b/previous-versions/accounting/docs/models/operations/listaccounttransactions409applicationjson.md deleted file mode 100755 index ab4bbd74f..000000000 --- a/previous-versions/accounting/docs/models/operations/listaccounttransactions409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListAccountTransactions409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listaccounttransactionsresponse.md b/previous-versions/accounting/docs/models/operations/listaccounttransactionsresponse.md index 158f344f6..aac38da42 100755 --- a/previous-versions/accounting/docs/models/operations/listaccounttransactionsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listaccounttransactionsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `account_transactions` | [Optional[shared.AccountTransactions]](../../models/shared/accounttransactions.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_account_transactions_409_application_json_object` | [Optional[ListAccountTransactions409ApplicationJSON]](../../models/operations/listaccounttransactions409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `account_transactions` | [Optional[shared.AccountTransactions]](../../models/shared/accounttransactions.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbankaccounts409applicationjson.md b/previous-versions/accounting/docs/models/operations/listbankaccounts409applicationjson.md deleted file mode 100755 index f4517620c..000000000 --- a/previous-versions/accounting/docs/models/operations/listbankaccounts409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListBankAccounts409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbankaccountsresponse.md b/previous-versions/accounting/docs/models/operations/listbankaccountsresponse.md index 9dbf6de48..bc8da8061 100755 --- a/previous-versions/accounting/docs/models/operations/listbankaccountsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listbankaccountsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `bank_accounts` | [Optional[shared.BankAccounts]](../../models/shared/bankaccounts.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_bank_accounts_409_application_json_object` | [Optional[ListBankAccounts409ApplicationJSON]](../../models/operations/listbankaccounts409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bank_accounts` | [Optional[shared.BankAccounts]](../../models/shared/bankaccounts.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbankaccounttransactions409applicationjson.md b/previous-versions/accounting/docs/models/operations/listbankaccounttransactions409applicationjson.md deleted file mode 100755 index f9077d3cb..000000000 --- a/previous-versions/accounting/docs/models/operations/listbankaccounttransactions409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListBankAccountTransactions409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbankaccounttransactionsresponse.md b/previous-versions/accounting/docs/models/operations/listbankaccounttransactionsresponse.md index b9c6409ac..efe79af66 100755 --- a/previous-versions/accounting/docs/models/operations/listbankaccounttransactionsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listbankaccounttransactionsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| `bank_transactions_response` | [Optional[shared.BankTransactionsResponse]](../../models/shared/banktransactionsresponse.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_bank_account_transactions_409_application_json_object` | [Optional[ListBankAccountTransactions409ApplicationJSON]](../../models/operations/listbankaccounttransactions409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bank_transactions` | [Optional[shared.BankTransactions]](../../models/shared/banktransactions.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbillattachmentsresponse.md b/previous-versions/accounting/docs/models/operations/listbillattachmentsresponse.md index 68e8227f1..3ab6cfdc8 100755 --- a/previous-versions/accounting/docs/models/operations/listbillattachmentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listbillattachmentsresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachments_dataset` | [Optional[shared.AttachmentsDataset]](../../models/shared/attachmentsdataset.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbillcreditnotes409applicationjson.md b/previous-versions/accounting/docs/models/operations/listbillcreditnotes409applicationjson.md deleted file mode 100755 index d64235ffd..000000000 --- a/previous-versions/accounting/docs/models/operations/listbillcreditnotes409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListBillCreditNotes409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbillcreditnotesresponse.md b/previous-versions/accounting/docs/models/operations/listbillcreditnotesresponse.md index b657de431..50c8c31e0 100755 --- a/previous-versions/accounting/docs/models/operations/listbillcreditnotesresponse.md +++ b/previous-versions/accounting/docs/models/operations/listbillcreditnotesresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `bill_credit_notes` | [Optional[shared.BillCreditNotes]](../../models/shared/billcreditnotes.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_bill_credit_notes_409_application_json_object` | [Optional[ListBillCreditNotes409ApplicationJSON]](../../models/operations/listbillcreditnotes409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bill_credit_notes` | [Optional[shared.BillCreditNotes]](../../models/shared/billcreditnotes.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbillpayments409applicationjson.md b/previous-versions/accounting/docs/models/operations/listbillpayments409applicationjson.md deleted file mode 100755 index c2686c5c2..000000000 --- a/previous-versions/accounting/docs/models/operations/listbillpayments409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListBillPayments409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbillpaymentsresponse.md b/previous-versions/accounting/docs/models/operations/listbillpaymentsresponse.md index f74e12aa1..fb78d3c5b 100755 --- a/previous-versions/accounting/docs/models/operations/listbillpaymentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listbillpaymentsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `bill_payments` | [Optional[shared.BillPayments]](../../models/shared/billpayments.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_bill_payments_409_application_json_object` | [Optional[ListBillPayments409ApplicationJSON]](../../models/operations/listbillpayments409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bill_payments` | [Optional[shared.BillPayments]](../../models/shared/billpayments.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbills409applicationjson.md b/previous-versions/accounting/docs/models/operations/listbills409applicationjson.md deleted file mode 100755 index ae78aeada..000000000 --- a/previous-versions/accounting/docs/models/operations/listbills409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListBills409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listbillsresponse.md b/previous-versions/accounting/docs/models/operations/listbillsresponse.md index 4e18ed6e5..60a6804a5 100755 --- a/previous-versions/accounting/docs/models/operations/listbillsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listbillsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `bills` | [Optional[shared.Bills]](../../models/shared/bills.md) | :heavy_minus_sign: | Success | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_bills_409_application_json_object` | [Optional[ListBills409ApplicationJSON]](../../models/operations/listbills409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bills` | [Optional[shared.Bills]](../../models/shared/bills.md) | :heavy_minus_sign: | Success | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listcreditnotes409applicationjson.md b/previous-versions/accounting/docs/models/operations/listcreditnotes409applicationjson.md deleted file mode 100755 index bffd38517..000000000 --- a/previous-versions/accounting/docs/models/operations/listcreditnotes409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListCreditNotes409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listcreditnotesresponse.md b/previous-versions/accounting/docs/models/operations/listcreditnotesresponse.md index 1831284f8..114d4ec35 100755 --- a/previous-versions/accounting/docs/models/operations/listcreditnotesresponse.md +++ b/previous-versions/accounting/docs/models/operations/listcreditnotesresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `credit_notes` | [Optional[shared.CreditNotes]](../../models/shared/creditnotes.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_credit_notes_409_application_json_object` | [Optional[ListCreditNotes409ApplicationJSON]](../../models/operations/listcreditnotes409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `credit_notes` | [Optional[shared.CreditNotes]](../../models/shared/creditnotes.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listcustomerattachmentsresponse.md b/previous-versions/accounting/docs/models/operations/listcustomerattachmentsresponse.md index 6a25d0773..27e05f65b 100755 --- a/previous-versions/accounting/docs/models/operations/listcustomerattachmentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listcustomerattachmentsresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachments_dataset` | [Optional[shared.AttachmentsDataset]](../../models/shared/attachmentsdataset.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listcustomers409applicationjson.md b/previous-versions/accounting/docs/models/operations/listcustomers409applicationjson.md deleted file mode 100755 index 04461efbd..000000000 --- a/previous-versions/accounting/docs/models/operations/listcustomers409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListCustomers409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listcustomersresponse.md b/previous-versions/accounting/docs/models/operations/listcustomersresponse.md index 5c5f27523..33e0103b6 100755 --- a/previous-versions/accounting/docs/models/operations/listcustomersresponse.md +++ b/previous-versions/accounting/docs/models/operations/listcustomersresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `customers` | [Optional[shared.Customers]](../../models/shared/customers.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_customers_409_application_json_object` | [Optional[ListCustomers409ApplicationJSON]](../../models/operations/listcustomers409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `customers` | [Optional[shared.Customers]](../../models/shared/customers.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listdirectcostattachmentsresponse.md b/previous-versions/accounting/docs/models/operations/listdirectcostattachmentsresponse.md index 91ff524a7..bd6888242 100755 --- a/previous-versions/accounting/docs/models/operations/listdirectcostattachmentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listdirectcostattachmentsresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachments_dataset` | [Optional[shared.AttachmentsDataset]](../../models/shared/attachmentsdataset.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listdirectcosts409applicationjson.md b/previous-versions/accounting/docs/models/operations/listdirectcosts409applicationjson.md deleted file mode 100755 index a4a594517..000000000 --- a/previous-versions/accounting/docs/models/operations/listdirectcosts409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListDirectCosts409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listdirectcostsresponse.md b/previous-versions/accounting/docs/models/operations/listdirectcostsresponse.md index 069bd9cd2..fdb5e7814 100755 --- a/previous-versions/accounting/docs/models/operations/listdirectcostsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listdirectcostsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `direct_costs` | [Optional[shared.DirectCosts]](../../models/shared/directcosts.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_direct_costs_409_application_json_object` | [Optional[ListDirectCosts409ApplicationJSON]](../../models/operations/listdirectcosts409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `direct_costs` | [Optional[shared.DirectCosts]](../../models/shared/directcosts.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listdirectincomeattachmentsresponse.md b/previous-versions/accounting/docs/models/operations/listdirectincomeattachmentsresponse.md index fcf1a4283..11926ec78 100755 --- a/previous-versions/accounting/docs/models/operations/listdirectincomeattachmentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listdirectincomeattachmentsresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachments_dataset` | [Optional[shared.AttachmentsDataset]](../../models/shared/attachmentsdataset.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listdirectincomes409applicationjson.md b/previous-versions/accounting/docs/models/operations/listdirectincomes409applicationjson.md deleted file mode 100755 index 527e59efb..000000000 --- a/previous-versions/accounting/docs/models/operations/listdirectincomes409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListDirectIncomes409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listdirectincomesresponse.md b/previous-versions/accounting/docs/models/operations/listdirectincomesresponse.md index e42ec8160..91c6bb208 100755 --- a/previous-versions/accounting/docs/models/operations/listdirectincomesresponse.md +++ b/previous-versions/accounting/docs/models/operations/listdirectincomesresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `direct_incomes` | [Optional[shared.DirectIncomes]](../../models/shared/directincomes.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_direct_incomes_409_application_json_object` | [Optional[ListDirectIncomes409ApplicationJSON]](../../models/operations/listdirectincomes409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `direct_incomes` | [Optional[shared.DirectIncomes]](../../models/shared/directincomes.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listinvoiceattachmentsresponse.md b/previous-versions/accounting/docs/models/operations/listinvoiceattachmentsresponse.md index 5e9888c53..0acb8c1db 100755 --- a/previous-versions/accounting/docs/models/operations/listinvoiceattachmentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listinvoiceattachmentsresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachments_dataset` | [Optional[shared.AttachmentsDataset]](../../models/shared/attachmentsdataset.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listinvoices409applicationjson.md b/previous-versions/accounting/docs/models/operations/listinvoices409applicationjson.md deleted file mode 100755 index 43a77a271..000000000 --- a/previous-versions/accounting/docs/models/operations/listinvoices409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListInvoices409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listinvoicesresponse.md b/previous-versions/accounting/docs/models/operations/listinvoicesresponse.md index 9c9f53d05..f858b1d39 100755 --- a/previous-versions/accounting/docs/models/operations/listinvoicesresponse.md +++ b/previous-versions/accounting/docs/models/operations/listinvoicesresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `invoices` | [Optional[shared.Invoices]](../../models/shared/invoices.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_invoices_409_application_json_object` | [Optional[ListInvoices409ApplicationJSON]](../../models/operations/listinvoices409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `invoices` | [Optional[shared.Invoices]](../../models/shared/invoices.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listitems409applicationjson.md b/previous-versions/accounting/docs/models/operations/listitems409applicationjson.md deleted file mode 100755 index 943055418..000000000 --- a/previous-versions/accounting/docs/models/operations/listitems409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListItems409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listitemsresponse.md b/previous-versions/accounting/docs/models/operations/listitemsresponse.md index f4d97f64f..6034c2492 100755 --- a/previous-versions/accounting/docs/models/operations/listitemsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listitemsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `items` | [Optional[shared.Items1]](../../models/shared/items1.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_items_409_application_json_object` | [Optional[ListItems409ApplicationJSON]](../../models/operations/listitems409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `items` | [Optional[shared.Items1]](../../models/shared/items1.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listjournalentries409applicationjson.md b/previous-versions/accounting/docs/models/operations/listjournalentries409applicationjson.md deleted file mode 100755 index e01a4576b..000000000 --- a/previous-versions/accounting/docs/models/operations/listjournalentries409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListJournalEntries409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listjournalentriesresponse.md b/previous-versions/accounting/docs/models/operations/listjournalentriesresponse.md index 1802801c9..71a56a0ff 100755 --- a/previous-versions/accounting/docs/models/operations/listjournalentriesresponse.md +++ b/previous-versions/accounting/docs/models/operations/listjournalentriesresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `journal_entries` | [Optional[shared.JournalEntries]](../../models/shared/journalentries.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_journal_entries_409_application_json_object` | [Optional[ListJournalEntries409ApplicationJSON]](../../models/operations/listjournalentries409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `journal_entries` | [Optional[shared.JournalEntries]](../../models/shared/journalentries.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listjournals409applicationjson.md b/previous-versions/accounting/docs/models/operations/listjournals409applicationjson.md deleted file mode 100755 index fca3b6cba..000000000 --- a/previous-versions/accounting/docs/models/operations/listjournals409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListJournals409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listjournalsresponse.md b/previous-versions/accounting/docs/models/operations/listjournalsresponse.md index ec984b5bf..82931e7a0 100755 --- a/previous-versions/accounting/docs/models/operations/listjournalsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listjournalsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `journals` | [Optional[shared.Journals]](../../models/shared/journals.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_journals_409_application_json_object` | [Optional[ListJournals409ApplicationJSON]](../../models/operations/listjournals409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `journals` | [Optional[shared.Journals]](../../models/shared/journals.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listpaymentmethods409applicationjson.md b/previous-versions/accounting/docs/models/operations/listpaymentmethods409applicationjson.md deleted file mode 100755 index 46f70e097..000000000 --- a/previous-versions/accounting/docs/models/operations/listpaymentmethods409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListPaymentMethods409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listpaymentmethodsresponse.md b/previous-versions/accounting/docs/models/operations/listpaymentmethodsresponse.md index 0a2c1da57..a3dcb7679 100755 --- a/previous-versions/accounting/docs/models/operations/listpaymentmethodsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listpaymentmethodsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `payment_methods` | [Optional[shared.PaymentMethods]](../../models/shared/paymentmethods.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_payment_methods_409_application_json_object` | [Optional[ListPaymentMethods409ApplicationJSON]](../../models/operations/listpaymentmethods409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `payment_methods` | [Optional[shared.PaymentMethods]](../../models/shared/paymentmethods.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listpayments409applicationjson.md b/previous-versions/accounting/docs/models/operations/listpayments409applicationjson.md deleted file mode 100755 index d2d35e334..000000000 --- a/previous-versions/accounting/docs/models/operations/listpayments409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListPayments409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listpaymentsresponse.md b/previous-versions/accounting/docs/models/operations/listpaymentsresponse.md index 1b7b42465..10c8fb42c 100755 --- a/previous-versions/accounting/docs/models/operations/listpaymentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listpaymentsresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `payments` | [Optional[shared.Payments]](../../models/shared/payments.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_payments_409_application_json_object` | [Optional[ListPayments409ApplicationJSON]](../../models/operations/listpayments409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `payments` | [Optional[shared.Payments]](../../models/shared/payments.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listpurchaseorders409applicationjson.md b/previous-versions/accounting/docs/models/operations/listpurchaseorders409applicationjson.md deleted file mode 100755 index be1e5b492..000000000 --- a/previous-versions/accounting/docs/models/operations/listpurchaseorders409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListPurchaseOrders409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listpurchaseordersresponse.md b/previous-versions/accounting/docs/models/operations/listpurchaseordersresponse.md index d7e3c6bd2..de6155ae8 100755 --- a/previous-versions/accounting/docs/models/operations/listpurchaseordersresponse.md +++ b/previous-versions/accounting/docs/models/operations/listpurchaseordersresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `purchase_orders` | [Optional[shared.PurchaseOrders]](../../models/shared/purchaseorders.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_purchase_orders_409_application_json_object` | [Optional[ListPurchaseOrders409ApplicationJSON]](../../models/operations/listpurchaseorders409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `purchase_orders` | [Optional[shared.PurchaseOrders]](../../models/shared/purchaseorders.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listsalesorders409applicationjson.md b/previous-versions/accounting/docs/models/operations/listsalesorders409applicationjson.md deleted file mode 100755 index 0e1eedd74..000000000 --- a/previous-versions/accounting/docs/models/operations/listsalesorders409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListSalesOrders409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listsalesordersresponse.md b/previous-versions/accounting/docs/models/operations/listsalesordersresponse.md index 5347edf85..a134a7782 100755 --- a/previous-versions/accounting/docs/models/operations/listsalesordersresponse.md +++ b/previous-versions/accounting/docs/models/operations/listsalesordersresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `sales_orders` | [Optional[shared.SalesOrders]](../../models/shared/salesorders.md) | :heavy_minus_sign: | Success | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `list_sales_orders_409_application_json_object` | [Optional[ListSalesOrders409ApplicationJSON]](../../models/operations/listsalesorders409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `sales_orders` | [Optional[shared.SalesOrders]](../../models/shared/salesorders.md) | :heavy_minus_sign: | Success | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listsupplierattachmentsresponse.md b/previous-versions/accounting/docs/models/operations/listsupplierattachmentsresponse.md index a5670a8b1..c31c86097 100755 --- a/previous-versions/accounting/docs/models/operations/listsupplierattachmentsresponse.md +++ b/previous-versions/accounting/docs/models/operations/listsupplierattachmentsresponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `attachments_dataset` | [Optional[shared.AttachmentsDataset]](../../models/shared/attachmentsdataset.md) | :heavy_minus_sign: | Success | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listsuppliers409applicationjson.md b/previous-versions/accounting/docs/models/operations/listsuppliers409applicationjson.md deleted file mode 100755 index 0f464540a..000000000 --- a/previous-versions/accounting/docs/models/operations/listsuppliers409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListSuppliers409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listsuppliersresponse.md b/previous-versions/accounting/docs/models/operations/listsuppliersresponse.md index d53b08f44..d0bc9c436 100755 --- a/previous-versions/accounting/docs/models/operations/listsuppliersresponse.md +++ b/previous-versions/accounting/docs/models/operations/listsuppliersresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `suppliers` | [Optional[shared.Suppliers]](../../models/shared/suppliers.md) | :heavy_minus_sign: | Success | -| `list_suppliers_409_application_json_object` | [Optional[ListSuppliers409ApplicationJSON]](../../models/operations/listsuppliers409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | +| `suppliers` | [Optional[shared.Suppliers]](../../models/shared/suppliers.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listtaxrates409applicationjson.md b/previous-versions/accounting/docs/models/operations/listtaxrates409applicationjson.md deleted file mode 100755 index 22bafb382..000000000 --- a/previous-versions/accounting/docs/models/operations/listtaxrates409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListTaxRates409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listtaxratesresponse.md b/previous-versions/accounting/docs/models/operations/listtaxratesresponse.md index 6389a4737..c69404905 100755 --- a/previous-versions/accounting/docs/models/operations/listtaxratesresponse.md +++ b/previous-versions/accounting/docs/models/operations/listtaxratesresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `tax_rates` | [Optional[shared.TaxRates]](../../models/shared/taxrates.md) | :heavy_minus_sign: | Success | -| `list_tax_rates_409_application_json_object` | [Optional[ListTaxRates409ApplicationJSON]](../../models/operations/listtaxrates409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | +| `tax_rates` | [Optional[shared.TaxRates]](../../models/shared/taxrates.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listtrackingcategories409applicationjson.md b/previous-versions/accounting/docs/models/operations/listtrackingcategories409applicationjson.md deleted file mode 100755 index 83ccd1811..000000000 --- a/previous-versions/accounting/docs/models/operations/listtrackingcategories409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListTrackingCategories409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listtrackingcategoriesresponse.md b/previous-versions/accounting/docs/models/operations/listtrackingcategoriesresponse.md index 883d0298f..60f28a160 100755 --- a/previous-versions/accounting/docs/models/operations/listtrackingcategoriesresponse.md +++ b/previous-versions/accounting/docs/models/operations/listtrackingcategoriesresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `tracking_categories` | [Optional[shared.TrackingCategories]](../../models/shared/trackingcategories.md) | :heavy_minus_sign: | Success | -| `list_tracking_categories_409_application_json_object` | [Optional[ListTrackingCategories409ApplicationJSON]](../../models/operations/listtrackingcategories409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | +| `tracking_categories` | [Optional[shared.TrackingCategories]](../../models/shared/trackingcategories.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listtransfers409applicationjson.md b/previous-versions/accounting/docs/models/operations/listtransfers409applicationjson.md deleted file mode 100755 index b5a52a459..000000000 --- a/previous-versions/accounting/docs/models/operations/listtransfers409applicationjson.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListTransfers409ApplicationJSON - -The data type's dataset has not been requested or is still syncing. - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `can_be_retried` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `correlation_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `detailed_error_code` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `error` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `service` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/listtransfersresponse.md b/previous-versions/accounting/docs/models/operations/listtransfersresponse.md index d26b903c7..c6e3ffd91 100755 --- a/previous-versions/accounting/docs/models/operations/listtransfersresponse.md +++ b/previous-versions/accounting/docs/models/operations/listtransfersresponse.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `content_type` | *str* | :heavy_check_mark: | N/A | -| `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `transfers` | [Optional[shared.Transfers]](../../models/shared/transfers.md) | :heavy_minus_sign: | Success | -| `list_transfers_409_application_json_object` | [Optional[ListTransfers409ApplicationJSON]](../../models/operations/listtransfers409applicationjson.md) | :heavy_minus_sign: | The data type's dataset has not been requested or is still syncing. | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | +| `transfers` | [Optional[shared.Transfers]](../../models/shared/transfers.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/refreshcompanyinforesponse.md b/previous-versions/accounting/docs/models/operations/refreshcompanyinforesponse.md index c11170088..dce350b9c 100755 --- a/previous-versions/accounting/docs/models/operations/refreshcompanyinforesponse.md +++ b/previous-versions/accounting/docs/models/operations/refreshcompanyinforesponse.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | | `dataset` | [Optional[shared.Dataset]](../../models/shared/dataset.md) | :heavy_minus_sign: | Success | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/updatebankaccountresponse.md b/previous-versions/accounting/docs/models/operations/updatebankaccountresponse.md index 93cb6ebf1..b16f1a99f 100755 --- a/previous-versions/accounting/docs/models/operations/updatebankaccountresponse.md +++ b/previous-versions/accounting/docs/models/operations/updatebankaccountresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `update_bank_account_response` | [Optional[shared.UpdateBankAccountResponse]](../../models/shared/updatebankaccountresponse.md) | :heavy_minus_sign: | Success | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `update_bank_account_response` | [Optional[shared.UpdateBankAccountResponse]](../../models/shared/updatebankaccountresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/updatebillcreditnoteresponse.md b/previous-versions/accounting/docs/models/operations/updatebillcreditnoteresponse.md index 048c2eb9a..7b71cd72c 100755 --- a/previous-versions/accounting/docs/models/operations/updatebillcreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/operations/updatebillcreditnoteresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `update_bill_credit_note_response` | [Optional[shared.UpdateBillCreditNoteResponse]](../../models/shared/updatebillcreditnoteresponse.md) | :heavy_minus_sign: | Success | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `update_bill_credit_note_response` | [Optional[shared.UpdateBillCreditNoteResponse]](../../models/shared/updatebillcreditnoteresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/updatebillresponse.md b/previous-versions/accounting/docs/models/operations/updatebillresponse.md index 757662721..0d0fac5c3 100755 --- a/previous-versions/accounting/docs/models/operations/updatebillresponse.md +++ b/previous-versions/accounting/docs/models/operations/updatebillresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `update_bill_response` | [Optional[shared.UpdateBillResponse]](../../models/shared/updatebillresponse.md) | :heavy_minus_sign: | Success | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `update_bill_response` | [Optional[shared.UpdateBillResponse]](../../models/shared/updatebillresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/updatecreditnoteresponse.md b/previous-versions/accounting/docs/models/operations/updatecreditnoteresponse.md index c82d4c019..8fb5d9a75 100755 --- a/previous-versions/accounting/docs/models/operations/updatecreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/operations/updatecreditnoteresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `update_credit_note_response` | [Optional[shared.UpdateCreditNoteResponse]](../../models/shared/updatecreditnoteresponse.md) | :heavy_minus_sign: | Success | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `update_credit_note_response` | [Optional[shared.UpdateCreditNoteResponse]](../../models/shared/updatecreditnoteresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/updatecustomerresponse.md b/previous-versions/accounting/docs/models/operations/updatecustomerresponse.md index 35002bb09..fd1d65882 100755 --- a/previous-versions/accounting/docs/models/operations/updatecustomerresponse.md +++ b/previous-versions/accounting/docs/models/operations/updatecustomerresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `update_customer_response` | [Optional[shared.UpdateCustomerResponse]](../../models/shared/updatecustomerresponse.md) | :heavy_minus_sign: | Success | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `update_customer_response` | [Optional[shared.UpdateCustomerResponse]](../../models/shared/updatecustomerresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/updateinvoiceresponse.md b/previous-versions/accounting/docs/models/operations/updateinvoiceresponse.md index 5c1b2caf9..226dc71f7 100755 --- a/previous-versions/accounting/docs/models/operations/updateinvoiceresponse.md +++ b/previous-versions/accounting/docs/models/operations/updateinvoiceresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `update_invoice_response` | [Optional[shared.UpdateInvoiceResponse]](../../models/shared/updateinvoiceresponse.md) | :heavy_minus_sign: | Success | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `update_invoice_response` | [Optional[shared.UpdateInvoiceResponse]](../../models/shared/updateinvoiceresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/updatepurchaseorderresponse.md b/previous-versions/accounting/docs/models/operations/updatepurchaseorderresponse.md index 254665528..182f42d8d 100755 --- a/previous-versions/accounting/docs/models/operations/updatepurchaseorderresponse.md +++ b/previous-versions/accounting/docs/models/operations/updatepurchaseorderresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `update_purchase_order_response` | [Optional[shared.UpdatePurchaseOrderResponse]](../../models/shared/updatepurchaseorderresponse.md) | :heavy_minus_sign: | Success | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `update_purchase_order_response` | [Optional[shared.UpdatePurchaseOrderResponse]](../../models/shared/updatepurchaseorderresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/updatesupplierresponse.md b/previous-versions/accounting/docs/models/operations/updatesupplierresponse.md index 290d1e4bc..ac9a2fd4f 100755 --- a/previous-versions/accounting/docs/models/operations/updatesupplierresponse.md +++ b/previous-versions/accounting/docs/models/operations/updatesupplierresponse.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | `status_code` | *int* | :heavy_check_mark: | N/A | | `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `update_supplier_response` | [Optional[shared.UpdateSupplierResponse]](../../models/shared/updatesupplierresponse.md) | :heavy_minus_sign: | Success | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. | \ No newline at end of file +| `update_supplier_response` | [Optional[shared.UpdateSupplierResponse]](../../models/shared/updatesupplierresponse.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/uploadbillattachmentresponse.md b/previous-versions/accounting/docs/models/operations/uploadbillattachmentresponse.md index 5e765a639..a43068be5 100755 --- a/previous-versions/accounting/docs/models/operations/uploadbillattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/uploadbillattachmentresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentrequest.md b/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentrequest.md new file mode 100755 index 000000000..56dd2be42 --- /dev/null +++ b/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentrequest.md @@ -0,0 +1,11 @@ +# UploadBillCreditNoteAttachmentRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `request_body` | [Optional[UploadBillCreditNoteAttachmentRequestBody]](../../models/operations/uploadbillcreditnoteattachmentrequestbody.md) | :heavy_minus_sign: | N/A | | +| `bill_credit_note_id` | *str* | :heavy_check_mark: | N/A | | +| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentrequestbody.md b/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentrequestbody.md new file mode 100755 index 000000000..f0acc11f1 --- /dev/null +++ b/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentrequestbody.md @@ -0,0 +1,9 @@ +# UploadBillCreditNoteAttachmentRequestBody + + +## Fields + +| 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 diff --git a/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentresponse.md b/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentresponse.md new file mode 100755 index 000000000..935b2eef2 --- /dev/null +++ b/previous-versions/accounting/docs/models/operations/uploadbillcreditnoteattachmentresponse.md @@ -0,0 +1,11 @@ +# UploadBillCreditNoteAttachmentResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/uploaddirectcostattachmentresponse.md b/previous-versions/accounting/docs/models/operations/uploaddirectcostattachmentresponse.md index 17de36691..64f92c1fd 100755 --- a/previous-versions/accounting/docs/models/operations/uploaddirectcostattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/uploaddirectcostattachmentresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/uploaddirectincomeattachmentresponse.md b/previous-versions/accounting/docs/models/operations/uploaddirectincomeattachmentresponse.md index 236309205..3712e1b27 100755 --- a/previous-versions/accounting/docs/models/operations/uploaddirectincomeattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/uploaddirectincomeattachmentresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/uploadinvoiceattachmentresponse.md b/previous-versions/accounting/docs/models/operations/uploadinvoiceattachmentresponse.md index 712940387..72ea5aff7 100755 --- a/previous-versions/accounting/docs/models/operations/uploadinvoiceattachmentresponse.md +++ b/previous-versions/accounting/docs/models/operations/uploadinvoiceattachmentresponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `status_code` | *int* | :heavy_check_mark: | N/A | -| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | -| `schema` | [Optional[shared.Schema]](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. | \ No newline at end of file +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/uploadtransferattachmentrequest.md b/previous-versions/accounting/docs/models/operations/uploadtransferattachmentrequest.md new file mode 100755 index 000000000..ff85facd8 --- /dev/null +++ b/previous-versions/accounting/docs/models/operations/uploadtransferattachmentrequest.md @@ -0,0 +1,11 @@ +# UploadTransferAttachmentRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `request_body` | [Optional[UploadTransferAttachmentRequestBody]](../../models/operations/uploadtransferattachmentrequestbody.md) | :heavy_minus_sign: | N/A | | +| `company_id` | *str* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connection_id` | *str* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `transfer_id` | *str* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/operations/uploadtransferattachmentrequestbody.md b/previous-versions/accounting/docs/models/operations/uploadtransferattachmentrequestbody.md new file mode 100755 index 000000000..27fd6afbe --- /dev/null +++ b/previous-versions/accounting/docs/models/operations/uploadtransferattachmentrequestbody.md @@ -0,0 +1,9 @@ +# UploadTransferAttachmentRequestBody + + +## Fields + +| 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 diff --git a/previous-versions/accounting/docs/models/operations/uploadtransferattachmentresponse.md b/previous-versions/accounting/docs/models/operations/uploadtransferattachmentresponse.md new file mode 100755 index 000000000..701f771c7 --- /dev/null +++ b/previous-versions/accounting/docs/models/operations/uploadtransferattachmentresponse.md @@ -0,0 +1,11 @@ +# UploadTransferAttachmentResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | N/A | +| `error_message` | [Optional[shared.ErrorMessage]](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `status_code` | *int* | :heavy_check_mark: | N/A | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/account.md b/previous-versions/accounting/docs/models/shared/account.md index 71c5671ec..5f8d5286c 100755 --- a/previous-versions/accounting/docs/models/shared/account.md +++ b/previous-versions/accounting/docs/models/shared/account.md @@ -15,6 +15,14 @@ The categories for an account include: * Liability * Equity. +The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. + +At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. + +To determine the list of allowed categories for a specific integration, you can: +- Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model). +- Refer to the integration's own documentation. + > **Accounts with no category** > > If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`. @@ -27,17 +35,17 @@ The categories for an account include: | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `current_balance` | *Optional[float]* | :heavy_minus_sign: | Current balance in the account. | 0 | +| `current_balance` | *Optional[Decimal]* | :heavy_minus_sign: | Current balance in the account. | 0 | | `description` | *Optional[str]* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | -| `fully_qualified_category` | *Optional[str]* | :heavy_minus_sign: | Full category of the account. For example:
Liability.Current or Income.Revenue. See example data. | Asset.Current | -| `fully_qualified_name` | *Optional[str]* | :heavy_minus_sign: | Full name of the account, for example:
- `Liability.Current.VAT`
- `Income.Revenue.Sales` | Asset.Current.Accounts Receivable | +| `fully_qualified_category` | *Optional[str]* | :heavy_minus_sign: | Full category of the account.

For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation. | Asset.Current | +| `fully_qualified_name` | *Optional[str]* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | Cash On Hand | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company. | 1b6266d1-1e44-46c5-8eb5-a8f98e03124e | -| `is_bank_account` | *bool* | :heavy_check_mark: | Confirms whether the account is a bank account or not. | | +| `is_bank_account` | *Optional[bool]* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | | `metadata` | [Optional[Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `name` | *Optional[str]* | :heavy_minus_sign: | 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` | [AccountStatus](../../models/shared/accountstatus.md) | :heavy_check_mark: | Status of the account | Active | -| `type` | [AccountType](../../models/shared/accounttype.md) | :heavy_check_mark: | Type of account | Asset | +| `status` | [Optional[AccountStatus]](../../models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | +| `type` | [Optional[AccountType]](../../models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | | `valid_datatype_links` | list[[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](/accounting-api#/schemas/ValidDataTypeLinks). | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/addresstype.md b/previous-versions/accounting/docs/models/shared/accountingaddresstype.md similarity index 88% rename from previous-versions/accounting/docs/models/shared/addresstype.md rename to previous-versions/accounting/docs/models/shared/accountingaddresstype.md index 5de1e6e1a..ab6961bcd 100755 --- a/previous-versions/accounting/docs/models/shared/addresstype.md +++ b/previous-versions/accounting/docs/models/shared/accountingaddresstype.md @@ -1,4 +1,4 @@ -# AddressType +# AccountingAddressType The type of the address diff --git a/previous-versions/accounting/docs/models/shared/customerref.md b/previous-versions/accounting/docs/models/shared/accountingcustomerref.md similarity index 96% rename from previous-versions/accounting/docs/models/shared/customerref.md rename to previous-versions/accounting/docs/models/shared/accountingcustomerref.md index 3dfec5747..ca511031e 100755 --- a/previous-versions/accounting/docs/models/shared/customerref.md +++ b/previous-versions/accounting/docs/models/shared/accountingcustomerref.md @@ -1,4 +1,4 @@ -# CustomerRef +# AccountingCustomerRef ## Fields diff --git a/previous-versions/accounting/docs/models/shared/accounts.md b/previous-versions/accounting/docs/models/shared/accounts.md index b75102877..c1e6401bd 100755 --- a/previous-versions/accounting/docs/models/shared/accounts.md +++ b/previous-versions/accounting/docs/models/shared/accounts.md @@ -1,7 +1,5 @@ # Accounts -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/accounttransaction.md b/previous-versions/accounting/docs/models/shared/accounttransaction.md index 65930ae94..8aaeb5696 100755 --- a/previous-versions/accounting/docs/models/shared/accounttransaction.md +++ b/previous-versions/accounting/docs/models/shared/accounttransaction.md @@ -25,7 +25,7 @@ Account transactions is the parent data type of [payments](https://docs.codat.io | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `bank_account_ref` | [Optional[BankAccountRef]](../../models/shared/bankaccountref.md) | :heavy_minus_sign: | Links to the Account transactions data type. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `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 | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of the direct cost (unique to the company). | | | `lines` | list[[AccountTransactionLine](../../models/shared/accounttransactionline.md)] | :heavy_minus_sign: | Array of account transaction lines. | | @@ -34,5 +34,5 @@ Account transactions is the parent data type of [payments](https://docs.codat.io | `note` | *Optional[str]* | :heavy_minus_sign: | Additional information about the account transaction, if available. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `status` | [Optional[AccountTransactionStatus]](../../models/shared/accounttransactionstatus.md) | :heavy_minus_sign: | The status of the account transaction. | | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the account transactions, inclusive of tax. | | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the account transactions, inclusive of tax. | | | `transaction_id` | *Optional[str]* | :heavy_minus_sign: | Identifier of the transaction (unique to the company). | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/accounttransactionline.md b/previous-versions/accounting/docs/models/shared/accounttransactionline.md index 067738a4c..10eef08b8 100755 --- a/previous-versions/accounting/docs/models/shared/accounttransactionline.md +++ b/previous-versions/accounting/docs/models/shared/accounttransactionline.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `amount` | *Optional[float]* | :heavy_minus_sign: | Amount in the bill payment currency. | -| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the account transaction. | -| `record_ref` | [Optional[InvoiceTo]](../../models/shared/invoiceto.md) | :heavy_minus_sign: | Links to the underlying record or data type.

Found on:

- Journal entries
- Account transactions
- Invoices
- Transfers | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount in the bill payment currency. | +| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the account transaction. | +| `record_ref` | [Optional[InvoiceTo]](../../models/shared/invoiceto.md) | :heavy_minus_sign: | Links the current record to the underlying record or data type that created it.

For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/accounttransactions.md b/previous-versions/accounting/docs/models/shared/accounttransactions.md index cd693e18a..c09412e10 100755 --- a/previous-versions/accounting/docs/models/shared/accounttransactions.md +++ b/previous-versions/accounting/docs/models/shared/accounttransactions.md @@ -1,7 +1,5 @@ # AccountTransactions -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/addressesitems.md b/previous-versions/accounting/docs/models/shared/addressesitems.md index 0210b64a3..e087286c3 100755 --- a/previous-versions/accounting/docs/models/shared/addressesitems.md +++ b/previous-versions/accounting/docs/models/shared/addressesitems.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` | [AddressType](../../models/shared/addresstype.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` | [AccountingAddressType](../../models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstanding.md b/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstanding.md index 009289de2..b848222e6 100755 --- a/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstanding.md +++ b/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstanding.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `aged_outstanding_amounts` | list[[AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmount](../../models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamount.md)] | :heavy_minus_sign: | Array of outstanding amounts by period. | | +| `aged_outstanding_amounts` | list[[AgedOutstandingAmount](../../models/shared/agedoutstandingamount.md)] | :heavy_minus_sign: | Array of outstanding amounts by period. | | | `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 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamount.md b/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamount.md deleted file mode 100755 index 5acef5054..000000000 --- a/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamount.md +++ /dev/null @@ -1,11 +0,0 @@ -# AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmount - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount outstanding. | | -| `details` | list[[AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmountAmountsOutstandingByDataType](../../models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamountamountsoutstandingbydatatype.md)] | :heavy_minus_sign: | Array of details. | | -| `from_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 | -| `to_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 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamountamountsoutstandingbydatatype.md b/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamountamountsoutstandingbydatatype.md deleted file mode 100755 index 89c8c16ab..000000000 --- a/previous-versions/accounting/docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamountamountsoutstandingbydatatype.md +++ /dev/null @@ -1,9 +0,0 @@ -# AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmountAmountsOutstandingByDataType - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount outstanding. | -| `name` | *Optional[str]* | :heavy_minus_sign: | Name of data type with outstanding amount for given period. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/agedcurrencyoutstandingitems.md b/previous-versions/accounting/docs/models/shared/agedcurrencyoutstandingitems.md index 01f03d592..9ebca5d1f 100755 --- a/previous-versions/accounting/docs/models/shared/agedcurrencyoutstandingitems.md +++ b/previous-versions/accounting/docs/models/shared/agedcurrencyoutstandingitems.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `aged_outstanding_amounts` | list[[ItemsAgedOutstandingAmount](../../models/shared/itemsagedoutstandingamount.md)] | :heavy_minus_sign: | Array of outstanding amounts by period. | | +| `aged_outstanding_amounts` | list[[AgedOutstandingAmount](../../models/shared/agedoutstandingamount.md)] | :heavy_minus_sign: | Array of outstanding amounts by period. | | | `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 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/itemsagedoutstandingamount.md b/previous-versions/accounting/docs/models/shared/agedoutstandingamount.md similarity index 98% rename from previous-versions/accounting/docs/models/shared/itemsagedoutstandingamount.md rename to previous-versions/accounting/docs/models/shared/agedoutstandingamount.md index c65ee9d20..8cedbc027 100755 --- a/previous-versions/accounting/docs/models/shared/itemsagedoutstandingamount.md +++ b/previous-versions/accounting/docs/models/shared/agedoutstandingamount.md @@ -1,11 +1,11 @@ -# ItemsAgedOutstandingAmount +# AgedOutstandingAmount ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount outstanding. | | -| `details` | list[[ItemsAgedOutstandingAmountAmountsOutstandingByDataType](../../models/shared/itemsagedoutstandingamountamountsoutstandingbydatatype.md)] | :heavy_minus_sign: | Array of details. | | +| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | The amount outstanding. | | +| `details` | list[[AgedOutstandingAmountDetail](../../models/shared/agedoutstandingamountdetail.md)] | :heavy_minus_sign: | Array of details. | | | `from_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 | | `to_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 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/itemsagedoutstandingamountamountsoutstandingbydatatype.md b/previous-versions/accounting/docs/models/shared/agedoutstandingamountdetail.md similarity index 88% rename from previous-versions/accounting/docs/models/shared/itemsagedoutstandingamountamountsoutstandingbydatatype.md rename to previous-versions/accounting/docs/models/shared/agedoutstandingamountdetail.md index 51fda8d7c..4016cffe4 100755 --- a/previous-versions/accounting/docs/models/shared/itemsagedoutstandingamountamountsoutstandingbydatatype.md +++ b/previous-versions/accounting/docs/models/shared/agedoutstandingamountdetail.md @@ -1,9 +1,9 @@ -# ItemsAgedOutstandingAmountAmountsOutstandingByDataType +# AgedOutstandingAmountDetail ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount outstanding. | +| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | The amount outstanding. | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of data type with outstanding amount for given period. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/attachmentsdataset.md b/previous-versions/accounting/docs/models/shared/attachmentsdataset.md index 37ffcba57..db1ed2ee8 100755 --- a/previous-versions/accounting/docs/models/shared/attachmentsdataset.md +++ b/previous-versions/accounting/docs/models/shared/attachmentsdataset.md @@ -1,7 +1,5 @@ # AttachmentsDataset -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/balancesheet.md b/previous-versions/accounting/docs/models/shared/balancesheet.md index 1f10fb92a..96596e275 100755 --- a/previous-versions/accounting/docs/models/shared/balancesheet.md +++ b/previous-versions/accounting/docs/models/shared/balancesheet.md @@ -9,4 +9,4 @@ | `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 | | `equity` | [Optional[ReportLine]](../../models/shared/reportline.md) | :heavy_minus_sign: | N/A | | | `liabilities` | [Optional[ReportLine]](../../models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `net_assets` | *float* | :heavy_check_mark: | Value of net assets for a company in their base currency. | | \ No newline at end of file +| `net_assets` | *Decimal* | :heavy_check_mark: | Value of net assets for a company in their base currency. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/bankaccount.md b/previous-versions/accounting/docs/models/shared/bankaccount.md index 2c6c153d7..bede3a48a 100755 --- a/previous-versions/accounting/docs/models/shared/bankaccount.md +++ b/previous-versions/accounting/docs/models/shared/bankaccount.md @@ -25,8 +25,8 @@ Bank accounts data includes: | `account_name` | *Optional[str]* | :heavy_minus_sign: | Name of the bank account in the accounting platform. | | | `account_number` | *Optional[str]* | :heavy_minus_sign: | Account number for the bank account.

Xero integrations
Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.

FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | | | `account_type` | [Optional[BankAccountBankAccountType]](../../models/shared/bankaccountbankaccounttype.md) | :heavy_minus_sign: | The type of transactions and balances on the account.
For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
For Debit accounts, positive balances are assets, and positive transactions **increase** assets. | | -| `available_balance` | *Optional[float]* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | | -| `balance` | *Optional[float]* | :heavy_minus_sign: | Balance of the bank account. | | +| `available_balance` | *Optional[Decimal]* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | | +| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | Balance of the bank account. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | | `i_ban` | *Optional[str]* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting platform. | | @@ -34,6 +34,6 @@ Bank accounts data includes: | `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 | | `nominal_code` | *Optional[str]* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | | -| `overdraft_limit` | *Optional[float]* | :heavy_minus_sign: | Pre-arranged overdraft limit of the account.

The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. | | +| `overdraft_limit` | *Optional[Decimal]* | :heavy_minus_sign: | Pre-arranged overdraft limit of the account.

The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. | | | `sort_code` | *Optional[str]* | :heavy_minus_sign: | Sort code for the bank account.

Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/bankaccounts.md b/previous-versions/accounting/docs/models/shared/bankaccounts.md index 9b07c811a..4a989b9f5 100755 --- a/previous-versions/accounting/docs/models/shared/bankaccounts.md +++ b/previous-versions/accounting/docs/models/shared/bankaccounts.md @@ -1,7 +1,5 @@ # BankAccounts -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/banktransactions.md b/previous-versions/accounting/docs/models/shared/banktransactions.md index 9f4657749..5dcd71d38 100755 --- a/previous-versions/accounting/docs/models/shared/banktransactions.md +++ b/previous-versions/accounting/docs/models/shared/banktransactions.md @@ -1,34 +1,12 @@ # BankTransactions -> **Accessing Bank Accounts through Banking API** -> -> This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. -> -> To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/operations/list-all-banking-transactions) - -> View the coverage for bank transactions in the Data coverage explorer. - -## Overview - -Transactional banking data for a specific company and account. - -Bank transactions include the: -* Amount of the transaction. -* Current account balance. -* Transaction type, for example, credit, debit, or transfer. - ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `account_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `amount` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `balance` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `cleared_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `description` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `reconciled` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `transaction_type` | [Optional[BankTransactionType]](../../models/shared/banktransactiontype.md) | :heavy_minus_sign: | Type of transaction for the bank statement line | | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | +| `page_number` | *int* | :heavy_check_mark: | N/A | +| `page_size` | *int* | :heavy_check_mark: | N/A | +| `results` | list[[BankTransactionsSourceModifiedDate](../../models/shared/banktransactionssourcemodifieddate.md)] | :heavy_minus_sign: | N/A | +| `total_results` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/banktransactionsresponse.md b/previous-versions/accounting/docs/models/shared/banktransactionsresponse.md deleted file mode 100755 index dcd4c56da..000000000 --- a/previous-versions/accounting/docs/models/shared/banktransactionsresponse.md +++ /dev/null @@ -1,14 +0,0 @@ -# BankTransactionsResponse - -Success - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `page_number` | *int* | :heavy_check_mark: | N/A | -| `page_size` | *int* | :heavy_check_mark: | N/A | -| `results` | list[[BankTransactions](../../models/shared/banktransactions.md)] | :heavy_minus_sign: | N/A | -| `total_results` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/banktransactionssourcemodifieddate.md b/previous-versions/accounting/docs/models/shared/banktransactionssourcemodifieddate.md new file mode 100755 index 000000000..93372f625 --- /dev/null +++ b/previous-versions/accounting/docs/models/shared/banktransactionssourcemodifieddate.md @@ -0,0 +1,34 @@ +# BankTransactionsSourceModifiedDate + +> **Accessing Bank Accounts through Banking API** +> +> This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. +> +> To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/operations/list-all-banking-transactions) + +> View the coverage for bank transactions in the Data coverage explorer. + +## Overview + +Transactional banking data for a specific company and account. + +Bank transactions include the: +* Amount of the transaction. +* Current account balance. +* Transaction type, for example, credit, debit, or transfer. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `account_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | +| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | +| `cleared_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `description` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | +| `reconciled` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | +| `transaction_type` | [Optional[BankTransactionType]](../../models/shared/banktransactiontype.md) | :heavy_minus_sign: | Type of transaction for the bank statement line | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/bill.md b/previous-versions/accounting/docs/models/shared/bill.md index 3741ad71e..18158f886 100755 --- a/previous-versions/accounting/docs/models/shared/bill.md +++ b/previous-versions/accounting/docs/models/shared/bill.md @@ -25,9 +25,9 @@ You can find these types of transactions in our [Direct costs](https://docs.coda | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount_due` | *Optional[float]* | :heavy_minus_sign: | Amount outstanding on the bill. | | +| `amount_due` | *Optional[Decimal]* | :heavy_minus_sign: | Amount outstanding on the bill. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `due_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the bill, unique for the company in the accounting platform. | | | `issue_date` | *str* | :heavy_check_mark: | N/A | 2022-10-23T00:00:00.000Z | @@ -40,9 +40,9 @@ You can find these types of transactions in our [Direct costs](https://docs.coda | `reference` | *Optional[str]* | :heavy_minus_sign: | User-friendly reference for the bill. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `status` | [BillStatus](../../models/shared/billstatus.md) | :heavy_check_mark: | Current state of the bill. | | -| `sub_total` | *float* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | | -| `supplemental_data` | [Optional[BillSupplementalData]](../../models/shared/billsupplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | +| `sub_total` | *Decimal* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | | +| `supplemental_data` | [Optional[BillSupplementalData]](../../models/shared/billsupplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `supplier_ref` | [Optional[SupplierRef]](../../models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | -| `tax_amount` | *float* | :heavy_check_mark: | Amount of tax on the bill. | | -| `total_amount` | *float* | :heavy_check_mark: | Amount of the bill, including tax. | | +| `tax_amount` | *Decimal* | :heavy_check_mark: | Amount of tax on the bill. | | +| `total_amount` | *Decimal* | :heavy_check_mark: | Amount of the bill, including tax. | | | `withholding_tax` | list[[BillWithholdingTax](../../models/shared/billwithholdingtax.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billcreditnote.md b/previous-versions/accounting/docs/models/shared/billcreditnote.md index e07b1a8ff..93167f514 100755 --- a/previous-versions/accounting/docs/models/shared/billcreditnote.md +++ b/previous-versions/accounting/docs/models/shared/billcreditnote.md @@ -25,8 +25,8 @@ A bill credit note includes details of: | `allocated_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `bill_credit_note_number` | *Optional[str]* | :heavy_minus_sign: | Friendly reference for the bill credit note. | 91fe2a83-e161-4c21-929d-c5c10c4b07e5 | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | -| `discount_percentage` | *float* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `discount_percentage` | *Decimal* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the bill credit note that is unique to a company in the accounting platform. | 1509398f-98e2-436d-8a5d-c042e0c74ffc | | `issue_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `line_items` | list[[BillCreditNoteLineItem](../../models/shared/billcreditnotelineitem.md)] | :heavy_minus_sign: | An array of line | | @@ -34,13 +34,13 @@ A bill credit note includes details of: | `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `note` | *Optional[str]* | :heavy_minus_sign: | Any additional information about the bill credit note. | Bill Credit Note with 1 line items, totaling 805.78 | | `payment_allocations` | list[[Items](../../models/shared/items.md)] | :heavy_minus_sign: | An array of payment allocations. | | -| `remaining_credit` | *Optional[float]* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 | +| `remaining_credit` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `status` | [BillCreditNoteStatus](../../models/shared/billcreditnotestatus.md) | :heavy_check_mark: | Current state of the bill credit note | Paid | -| `sub_total` | *float* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | +| `sub_total` | *Decimal* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 | +| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `supplier_ref` | [Optional[SupplierRef]](../../models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | -| `total_amount` | *float* | :heavy_check_mark: | Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. | 805.78 | -| `total_discount` | *float* | :heavy_check_mark: | Total value of any discounts applied. | 0 | -| `total_tax_amount` | *float* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 | +| `total_amount` | *Decimal* | :heavy_check_mark: | Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. | 805.78 | +| `total_discount` | *Decimal* | :heavy_check_mark: | Total value of any discounts applied. | 0 | +| `total_tax_amount` | *Decimal* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 | | `withholding_tax` | list[[WithholdingTaxitems](../../models/shared/withholdingtaxitems.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billcreditnotelineitem.md b/previous-versions/accounting/docs/models/shared/billcreditnotelineitem.md index 439febff1..86a4c70fa 100755 --- a/previous-versions/accounting/docs/models/shared/billcreditnotelineitem.md +++ b/previous-versions/accounting/docs/models/shared/billcreditnotelineitem.md @@ -7,14 +7,14 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Friendly name of each line item. For example, the goods or service for which credit has been received. | -| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Value of any discounts applied. | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | +| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Value of any discounts applied. | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | | `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | N/A | -| `quantity` | *float* | :heavy_check_mark: | Number of units of the goods or service for which credit has been received. | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | -| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax associated with the line item. | +| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of the goods or service for which credit has been received. | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | +| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax associated with the line item. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | | `tracking` | [Optional[BillCreditNoteLineItemTracking]](../../models/shared/billcreditnotelineitemtracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | -| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible.

Reference to the tracking categories to which the line item is linked. | -| `unit_amount` | *float* | :heavy_check_mark: | Unit price of the goods or service. | \ No newline at end of file +| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Reference to the tracking categories to which the line item is linked. | +| `unit_amount` | *Decimal* | :heavy_check_mark: | Unit price of the goods or service. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billcreditnotelineitemtracking.md b/previous-versions/accounting/docs/models/shared/billcreditnotelineitemtracking.md index 947492089..a846afad3 100755 --- a/previous-versions/accounting/docs/models/shared/billcreditnotelineitemtracking.md +++ b/previous-versions/accounting/docs/models/shared/billcreditnotelineitemtracking.md @@ -5,10 +5,10 @@ Categories, and a project and customer, against which the item is tracked. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A | -| `customer_ref` | [Optional[CustomerRef]](../../models/shared/customerref.md) | :heavy_minus_sign: | N/A | -| `is_billed_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A | -| `is_rebilled_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A | -| `project_ref` | [Optional[ProjectRef]](../../models/shared/projectref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A | +| `customer_ref` | [Optional[AccountingCustomerRef]](../../models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | +| `is_billed_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A | +| `is_rebilled_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A | +| `project_ref` | [Optional[ProjectRef]](../../models/shared/projectref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billcreditnotes.md b/previous-versions/accounting/docs/models/shared/billcreditnotes.md index 5f5476a5c..4c045cbc5 100755 --- a/previous-versions/accounting/docs/models/shared/billcreditnotes.md +++ b/previous-versions/accounting/docs/models/shared/billcreditnotes.md @@ -1,7 +1,5 @@ # BillCreditNotes -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/billitem.md b/previous-versions/accounting/docs/models/shared/billitem.md index 6f776d472..caaa5406c 100755 --- a/previous-versions/accounting/docs/models/shared/billitem.md +++ b/previous-versions/accounting/docs/models/shared/billitem.md @@ -10,4 +10,4 @@ Item details that are only for bills. | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Short description of the product or service that has been bought by the customer. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `unit_price` | *Optional[float]* | :heavy_minus_sign: | Unit price of the product or service. | \ No newline at end of file +| `unit_price` | *Optional[Decimal]* | :heavy_minus_sign: | Unit price of the product or service. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billlineitem.md b/previous-versions/accounting/docs/models/shared/billlineitem.md index abab71a51..6685eb226 100755 --- a/previous-versions/accounting/docs/models/shared/billlineitem.md +++ b/previous-versions/accounting/docs/models/shared/billlineitem.md @@ -7,15 +7,15 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Friendly name of the goods or services received. | -| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Numerical value of any discounts applied.

Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Numerical value of any discounts applied.

Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | `is_direct_cost` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | N/A | -| `quantity` | *float* | :heavy_check_mark: | Number of units of goods or services received. | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | -| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax for the line. | +| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of goods or services received. | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax for the line. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line, including tax. | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line, including tax. | | `tracking` | [Optional[Propertiestracking]](../../models/shared/propertiestracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | -| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible.

Collection of categories against which this item is tracked. | -| `unit_amount` | *float* | :heavy_check_mark: | Price of each unit of goods or services. | \ No newline at end of file +| `tracking_category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | Collection of categories against which this item is tracked. | +| `unit_amount` | *Decimal* | :heavy_check_mark: | Price of each unit of goods or services. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billpayment.md b/previous-versions/accounting/docs/models/shared/billpayment.md index 78cc586f0..535a8a42a 100755 --- a/previous-versions/accounting/docs/models/shared/billpayment.md +++ b/previous-versions/accounting/docs/models/shared/billpayment.md @@ -159,16 +159,16 @@ These two rates allow the calculation of currency loss or gain for any of the tr | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | N/A | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `date_` | *str* | :heavy_check_mark: | N/A | 2022-10-23T00:00:00.000Z | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the bill payment, unique for the company in the accounting platform. | 3d5a8e00-d108-4045-8823-7f342676cffa | | `lines` | list[[BillPaymentLine](../../models/shared/billpaymentline.md)] | :heavy_minus_sign: | An array of bill payment lines. | | | `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 | | `note` | *Optional[str]* | :heavy_minus_sign: | Additional information associated with the payment. | Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44 | -| `payment_method_ref` | [Optional[PaymentMethodRef]](../../models/shared/paymentmethodref.md) | :heavy_minus_sign: | N/A | | +| `payment_method_ref` | *Optional[Any]* | :heavy_minus_sign: | N/A | | | `reference` | *Optional[str]* | :heavy_minus_sign: | Additional information associated with the payment. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | +| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `supplier_ref` | [Optional[SupplierRef]](../../models/shared/supplierref.md) | :heavy_minus_sign: | N/A | | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account. | 1329.54 | \ No newline at end of file +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account. | 1329.54 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billpaymentallocationallocation.md b/previous-versions/accounting/docs/models/shared/billpaymentallocationallocation.md index 8dcf326ba..a01cef670 100755 --- a/previous-versions/accounting/docs/models/shared/billpaymentallocationallocation.md +++ b/previous-versions/accounting/docs/models/shared/billpaymentallocationallocation.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `allocated_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billpaymentline.md b/previous-versions/accounting/docs/models/shared/billpaymentline.md index 7548a4682..bba4eb109 100755 --- a/previous-versions/accounting/docs/models/shared/billpaymentline.md +++ b/previous-versions/accounting/docs/models/shared/billpaymentline.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `allocated_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `amount` | *float* | :heavy_check_mark: | Amount in the bill payment currency. | | +| `amount` | *Decimal* | :heavy_check_mark: | Amount in the bill payment currency. | | | `links` | list[[BillPaymentLineLink](../../models/shared/billpaymentlinelink.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billpaymentlinelink.md b/previous-versions/accounting/docs/models/shared/billpaymentlinelink.md index 2e91fbc78..9087af70d 100755 --- a/previous-versions/accounting/docs/models/shared/billpaymentlinelink.md +++ b/previous-versions/accounting/docs/models/shared/billpaymentlinelink.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | *Optional[float]* | :heavy_minus_sign: | Amount by which the balance of the linked entity is altered, in the currency of the linked entity.

- A negative link amount reduces the outstanding amount on the accounts payable account.
- A positive link amount increases the outstanding amount on the accounts payable account. | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | +| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount by which the balance of the linked entity is altered, in the currency of the linked entity.

- A negative link amount reduces the outstanding amount on the accounts payable account.
- A positive link amount increases the outstanding amount on the accounts payable account. | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the transaction represented by the link. | | `type` | [BillPaymentLineLinkType](../../models/shared/billpaymentlinelinktype.md) | :heavy_check_mark: | Types of links to bill payment lines. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/billpayments.md b/previous-versions/accounting/docs/models/shared/billpayments.md index 18b2cc4b9..f688108c0 100755 --- a/previous-versions/accounting/docs/models/shared/billpayments.md +++ b/previous-versions/accounting/docs/models/shared/billpayments.md @@ -1,7 +1,5 @@ # BillPayments -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/bills.md b/previous-versions/accounting/docs/models/shared/bills.md index 4e633e5b6..406959654 100755 --- a/previous-versions/accounting/docs/models/shared/bills.md +++ b/previous-versions/accounting/docs/models/shared/bills.md @@ -1,7 +1,5 @@ # Bills -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/billsupplementaldata.md b/previous-versions/accounting/docs/models/shared/billsupplementaldata.md index 736ce1cda..dada772db 100755 --- a/previous-versions/accounting/docs/models/shared/billsupplementaldata.md +++ b/previous-versions/accounting/docs/models/shared/billsupplementaldata.md @@ -2,7 +2,7 @@ Supplemental data is additional data you can include in our standard data types. -It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. +It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. ## Fields diff --git a/previous-versions/accounting/docs/models/shared/billwithholdingtax.md b/previous-versions/accounting/docs/models/shared/billwithholdingtax.md index a2b842658..4e6a95fa2 100755 --- a/previous-versions/accounting/docs/models/shared/billwithholdingtax.md +++ b/previous-versions/accounting/docs/models/shared/billwithholdingtax.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `amount` | *float* | :heavy_check_mark: | N/A | +| `amount` | *Decimal* | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/companydataset.md b/previous-versions/accounting/docs/models/shared/companydataset.md index 8fae0bb5a..c87df5d5d 100755 --- a/previous-versions/accounting/docs/models/shared/companydataset.md +++ b/previous-versions/accounting/docs/models/shared/companydataset.md @@ -14,7 +14,7 @@ Company info provides standard details about a linked company such as their addr | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `accounting_platform_ref` | *Optional[str]* | :heavy_minus_sign: | Identifier or reference for the company in the accounting platform. | | -| `addresses` | list[[CompanyDatasetAddresses](../../models/shared/companydatasetaddresses.md)] | :heavy_minus_sign: | An array of Addresses. | | +| `addresses` | list[[CompanyDatasetAccountingAddress](../../models/shared/companydatasetaccountingaddress.md)] | :heavy_minus_sign: | An array of Addresses. | | | `base_currency` | *Optional[str]* | :heavy_minus_sign: | Currency set in the accounting platform of the linked company. Used by the currency rate. | | | `company_legal_name` | *Optional[str]* | :heavy_minus_sign: | Registered legal name of the linked company. | | | `company_name` | *Optional[str]* | :heavy_minus_sign: | Name of the linked company. | | diff --git a/previous-versions/accounting/docs/models/shared/companydatasetaccountingaddress.md b/previous-versions/accounting/docs/models/shared/companydatasetaccountingaddress.md new file mode 100755 index 000000000..828257e62 --- /dev/null +++ b/previous-versions/accounting/docs/models/shared/companydatasetaccountingaddress.md @@ -0,0 +1,14 @@ +# CompanyDatasetAccountingAddress + + +## 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/previous-versions/accounting/docs/models/shared/companydatasetaddresses.md b/previous-versions/accounting/docs/models/shared/companydatasetaddresses.md deleted file mode 100755 index 5966a241f..000000000 --- a/previous-versions/accounting/docs/models/shared/companydatasetaddresses.md +++ /dev/null @@ -1,14 +0,0 @@ -# CompanyDatasetAddresses - - -## 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` | [AddressType](../../models/shared/addresstype.md) | :heavy_check_mark: | The type of the address | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createaccountresponse.md b/previous-versions/accounting/docs/models/shared/createaccountresponse.md index 20cee4397..0b96d3a90 100755 --- a/previous-versions/accounting/docs/models/shared/createaccountresponse.md +++ b/previous-versions/accounting/docs/models/shared/createaccountresponse.md @@ -1,23 +1,21 @@ # CreateAccountResponse -Success - ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | -| `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.

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

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `status_code` | *int* | :heavy_check_mark: | N/A | | -| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

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

View the coverage for accounts in the Data coverage explorer.

## Overview

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

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

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

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

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

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

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | +| `status_code` | *int* | :heavy_check_mark: | N/A | | +| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createbankaccountresponse.md b/previous-versions/accounting/docs/models/shared/createbankaccountresponse.md index 7bc4892c0..128544ded 100755 --- a/previous-versions/accounting/docs/models/shared/createbankaccountresponse.md +++ b/previous-versions/accounting/docs/models/shared/createbankaccountresponse.md @@ -1,13 +1,11 @@ # CreateBankAccountResponse -Success - ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[BankAccount]](../../models/shared/bankaccount.md) | :heavy_minus_sign: | > **Accessing Bank Accounts through Banking API**
>
> This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators.
>
> To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/schemas/Account)

> View the coverage for bank accounts in the Data coverage explorer.

## Overview

A list of bank accounts associated with a company and a specific data connection.

Bank accounts data includes:
* The name and ID of the account in the accounting platform.
* The currency and balance of the account.
* The sort code and account number. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createbankaccounttransaction.md b/previous-versions/accounting/docs/models/shared/createbankaccounttransaction.md index 12c4c6d1c..f69d51e05 100755 --- a/previous-versions/accounting/docs/models/shared/createbankaccounttransaction.md +++ b/previous-versions/accounting/docs/models/shared/createbankaccounttransaction.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `balance` | *Optional[float]* | :heavy_minus_sign: | N/A | | +| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | +| `balance` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | | `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 | | `description` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createbanktransactionsresponse.md b/previous-versions/accounting/docs/models/shared/createbanktransactionsresponse.md index 9f803b24e..b5fbd987e 100755 --- a/previous-versions/accounting/docs/models/shared/createbanktransactionsresponse.md +++ b/previous-versions/accounting/docs/models/shared/createbanktransactionsresponse.md @@ -1,13 +1,11 @@ # CreateBankTransactionsResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[CreateBankTransactions]](../../models/shared/createbanktransactions.md) | :heavy_minus_sign: | N/A | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createbillcreditnoteresponse.md b/previous-versions/accounting/docs/models/shared/createbillcreditnoteresponse.md index 2cc1a27ef..2a92ffd30 100755 --- a/previous-versions/accounting/docs/models/shared/createbillcreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/shared/createbillcreditnoteresponse.md @@ -1,13 +1,11 @@ # CreateBillCreditNoteResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[BillCreditNote]](../../models/shared/billcreditnote.md) | :heavy_minus_sign: | > **Bill credit notes or credit notes?**
>
> In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote).

View the coverage for bill credit notes in the Data coverage explorer.

## Overview

A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills.

In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier).

A bill credit note includes details of:
* The original and remaining credit.
* Any allocations of the credit against other records, such as [bills](https://docs.codat.io/accounting-api#/schemas/Bill).
* The supplier that issued the bill credit note. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createbillpaymentresponse.md b/previous-versions/accounting/docs/models/shared/createbillpaymentresponse.md index ccdc06328..03b7ffe61 100755 --- a/previous-versions/accounting/docs/models/shared/createbillpaymentresponse.md +++ b/previous-versions/accounting/docs/models/shared/createbillpaymentresponse.md @@ -1,13 +1,11 @@ # CreateBillPaymentResponse -Success - ## Fields | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[BillPayment]](../../models/shared/billpayment.md) | :heavy_minus_sign: | > **Bill payments or payments?**
>
> We distinguish between transactions where the company received money vs. paid money. If the transaction represents a company spending money (accounts payable) we call this a Bill payment.
>
> See [payments](https://docs.codat.io/accounting-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote).

> View the coverage for bill payments in the Data coverage explorer.

## Overview

Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/accounting-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/accounting-api#/schemas/BillCreditNote)).

A bill payment in Codat usually represents an allocation of money within any customer accounts payable account. This includes, but is not strictly limited to:

- A payment made against a bill — for example, a credit card payment, cheque payment, or cash payment.
- An allocation of a supplier's credit note to a bill or perhaps a refund.
- A bill payment made directly to an accounts payable account. This could be an overpayment or a prepayment, or a refund of a payment made directly to an accounts payable account.

Depending on the bill payments which are allowed by the underlying accounting package, some of these types may be combined. Please see the example data section for samples of what these cases look like.

In Codat, a bill payment contains details of:

- When the bill payment was recorded in the accounting system.
- How much it is for and in the currency.
- Who the payment has been paid to, the _supplier_.
- The types of bill payments, the _line items_.

Some accounting platforms give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's _expenses_. You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model.

Bill payments is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction).

---

## Bill payment types

### Payment of a bill

A payment paying a single bill should have the following properties:

- A `totalAmount` indicating the amount of the bill that was paid. This is always positive.
- A `lines` array containing one element with the following properties:
- An `amount` equal to the `totalAmount` above.
- A `links` array containing one element with the following properties:
- A `type` indicating the type of link, in this case a `Bill`.
- An `id` containing the ID of the bill that was paid.
- An amount of `-totalAmount` (negative `totalAmount`), indicating that the entirety of the paid amount is allocated to the bill.

### Payment of multiple bills

It is possible for one payment to pay multiple bills. This can be represented using two possible formats, depending on how the supplier keeps their books:

1. The payment has multiple entries in its **lines** array, one for each bill that is paid. Each line will follow the above example for paying a bill, and the rules detailed in the data model.
2. The payment has a line with multiple links to each bill. This occurs when the proportion of the original payment allocated to each bill is not available.

Each line is the same as those described above, with the **amount** indicating how much of the payment is allocated to the bill. The **amount** on the lines sum to the **totalAmount** on the payment.

> Pushing batch payments to Xero
>
> When pushing a single bill payment to Xero to pay multiple bills, only the first format is supported—multiple entries in the payment **lines** array.

### Payments and refunds on account

A payment on account, that is a payment that doesn’t pay a specific bill, has one entry in its lines array.

The line has the following properties:

- A **totalAmount** indicating the amount paid by a supplier or refunded to them by a company. A payment to the supplier is always negative. A refund is always positive.
- A **links** array containing one element with the following properties:
- A **type** indicating the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`.
- The **id** containing the ID of the supplier.
- An amount for the link is `0` **totalAmount** or the amount of the payment or refund.

It is possible to have a payment that is part on account and part allocated to a bill. Each line should follow the examples above.

### Using a credit note to pay a bill

The payment of a bill using a credit note has one entry in its `lines` array. This **line** has the following properties:

- An **amount** indicating the amount of money moved, which in this case is `0`, as the credit note and bill allocation must balance each other.
- A **links** array containing two elements:
- The first link has:
- A **type** indicating the type of link, in this case a `Bill`.
- An **id** containing the ID of the bill that was paid.
- The second link has:
- A **type** indicating the type of link, in this case a `CreditNote`.
- An **id** containing the ID of the credit note used by this payment.

The **amount** field on the **line** equals the **totalAmount** on the payment.

### Refunding a credit note

A bill payment refunding a credit note has one entry in its **lines** array. This line has the following properties:

- An **amount** indicating the amount of the credit note that was refunded. This is always negative, indicating that it is a refund.
- A **links** array containing one element with the following properties:
- A **type** indicating the type of `link`, in this case a `CreditNote`.
- An **id** containing the ID of the credit note that was refunded.

The **totalAmount** field on the payment equals the line's **amount** field. These are both negative, as this is money leaving accounts payable.

### Refunding a payment

If a payment is refunded, for example, when a company overpaid a bill and the overpayment is returned, there are two payment records:

- One for the incoming overpayment.
- Another for the outgoing refund.

The payment issuing the refund is identified by the fact that the **totalAmount** is negative. This payment has one entry in its lines array that have the following properties:

- An **amount** indicating the amount that was refunded. This is always negative.
- A **links** array containing one element with the following properties:
- A **type** indicating the type of a the link, in this case a `BillPayment`.
- An **id** containing the ID of the payment that was refunded.

The **amount** field on the line equals the **totalAmount** on the payment and is negative as this is money leaving accounts payable.

The payment that was refunded can be identified as it has a line where the `amount` on its `line` is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was partly used to pay an bill. For example, a £1,050 payment paying a £1,000 bill with a refund of £50 has two lines:

- One for £1,000 linked to the bill that was paid
- Another for £50 linked to the payment that refunded the over payment. This link is of type `Refund` but the ID corresponds to a bill payment.

The line linked to the bill payment has the following properties:

- An **amount** indicating the amount that was refunded. This is positive as its money that was added to accounts payable, but is balanced out by the negative amount of the refund.
- A **links** array containing one element with the following properties:
- A **type** indicating the type of the link, in this case a `Refund`.
- An **id** containing the ID of the payment that refunded this line.

> Linked payments
>
> Not all accounting packages support linked payments in this way. In these platforms you may see a payment on account and a refund on account.

## Foreign currencies

There are two types of currency rate that are detailed in the bill payments data type:

Payment currency rate:

- Base currency of the accounts payable account.
- Foreign currency of the bill payment.

Payment line link currency rate:

- Base currency of the item that the link represents.
- Foreign currency of the payment.

These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a bill payment is applied to an item in a currency that does not match either:

- The base currency for the accounts payable account.
- The currency of the item.
| | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createbillresponse.md b/previous-versions/accounting/docs/models/shared/createbillresponse.md index 249d086b1..616dc960c 100755 --- a/previous-versions/accounting/docs/models/shared/createbillresponse.md +++ b/previous-versions/accounting/docs/models/shared/createbillresponse.md @@ -1,13 +1,11 @@ # CreateBillResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[Bill]](../../models/shared/bill.md) | :heavy_minus_sign: | > **Invoices or bills?**
>
> We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill.
>
> See [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) for the accounts receivable equivalent of bills.

View the coverage for bills in the Data coverage explorer.

## Overview

In Codat, a bill contains details of:
* When the bill was recorded in the accounting system.
* How much the bill is for and the currency of the amount.
* Who the bill was received from — the *supplier*.
* What the bill is for — the *line items*.

Some accounting platforms give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*.

You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createcreditnoteresponse.md b/previous-versions/accounting/docs/models/shared/createcreditnoteresponse.md index c568226ef..37c7d0998 100755 --- a/previous-versions/accounting/docs/models/shared/createcreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/shared/createcreditnoteresponse.md @@ -1,13 +1,11 @@ # CreateCreditNoteResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[CreditNote]](../../models/shared/creditnote.md) | :heavy_minus_sign: | > View the coverage for credit notes in the Data coverage explorer.

## Overview

Think of a credit note as a voucher issued to a customer. It is a reduction that can be applied against one or multiple invoices. A credit note can either reduce the amount owed or cancel out an invoice entirely.

In the Codat system a credit note is issued to a [customer's](https://docs.codat.io/accounting-api#/schemas/Customer) accounts receivable.

It contains details of:
* The amount of credit remaining and its status.
* Payment allocations against the payments type, in this case an invoice.
* Which customers the credit notes have been issued to. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createcustomerresponse.md b/previous-versions/accounting/docs/models/shared/createcustomerresponse.md index 21b0b6cdd..a21a64b3b 100755 --- a/previous-versions/accounting/docs/models/shared/createcustomerresponse.md +++ b/previous-versions/accounting/docs/models/shared/createcustomerresponse.md @@ -1,13 +1,11 @@ # CreateCustomerResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `data` | [Optional[Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | > 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/accounting-api#/schemas/Invoice).
| | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createdirectcostresponse.md b/previous-versions/accounting/docs/models/shared/createdirectcostresponse.md index 532074e0a..af480f581 100755 --- a/previous-versions/accounting/docs/models/shared/createdirectcostresponse.md +++ b/previous-versions/accounting/docs/models/shared/createdirectcostresponse.md @@ -1,23 +1,21 @@ # CreateDirectCostResponse -Success - ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | -| `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[DirectCost]](../../models/shared/directcost.md) | :heavy_minus_sign: | > **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting platforms.

> View the coverage for direct costs in the Data coverage explorer.

## Overview

Direct costs include:
* Purchasing an item and paying it off at the point of the purchase
* Receiving cash from a refunded item if the refund is made by the supplier
* Withdrawing money from a bank account
* Writing a cheque

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

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `status_code` | *int* | :heavy_check_mark: | N/A | | -| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| 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[DirectCost]](../../models/shared/directcost.md) | :heavy_minus_sign: | > **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting platforms.

> View the coverage for direct costs in the Data coverage explorer.

## Overview

Direct costs are the expenses associated with a business' operations. For example, purchases of raw materials and service fees are considered direct costs.

Direct costs include:
* Purchasing an item and paying it off at the point of the purchase
* Receiving cash from a refunded item if the refund is made by the supplier
* Withdrawing money from a bank account
* Writing a cheque

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

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | +| `status_code` | *int* | :heavy_check_mark: | N/A | | +| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createdirectincomeresponse.md b/previous-versions/accounting/docs/models/shared/createdirectincomeresponse.md index 59e2f2b3a..6b4ec4bb3 100755 --- a/previous-versions/accounting/docs/models/shared/createdirectincomeresponse.md +++ b/previous-versions/accounting/docs/models/shared/createdirectincomeresponse.md @@ -1,23 +1,21 @@ # CreateDirectIncomeResponse -Success - ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | -| `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[DirectIncome]](../../models/shared/directincome.md) | :heavy_minus_sign: | > **Language tip:** Direct incomes may also be referred to as **Receive transactions**, **Receive money transactions**, **Sales receipts**, or **Cash sales** in various accounting platforms.

> View the coverage for direct incomes in the Data coverage explorer.

## Overview

Direct incomes include:

- Selling an item directly to a contact, and receiving payment at the point of the sale.
- Refunding an item in cash to a contact.
- Depositing money into a bank account.

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

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `status_code` | *int* | :heavy_check_mark: | N/A | | -| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| 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[DirectIncome]](../../models/shared/directincome.md) | :heavy_minus_sign: | > **Language tip:** Direct incomes may also be referred to as **Receive transactions**, **Receive money transactions**, **Sales receipts**, or **Cash sales** in various accounting platforms.

> View the coverage for direct incomes in the Data coverage explorer.

## Overview

Direct incomes are incomes received directly from the business' operations. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes.

Direct incomes include:

- Selling an item directly to a contact, and receiving payment at the point of the sale.
- Refunding an item in cash to a contact.
- Depositing money into a bank account.

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

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | +| `status_code` | *int* | :heavy_check_mark: | N/A | | +| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createinvoiceresponse.md b/previous-versions/accounting/docs/models/shared/createinvoiceresponse.md index 087888b88..6d51b3682 100755 --- a/previous-versions/accounting/docs/models/shared/createinvoiceresponse.md +++ b/previous-versions/accounting/docs/models/shared/createinvoiceresponse.md @@ -1,13 +1,11 @@ # CreateInvoiceResponse -Success - ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[Invoice]](../../models/shared/invoice.md) | :heavy_minus_sign: | > **Invoices or bills?**
>
> We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company issued an invoice, and is owed money (accounts receivable) we call this an Invoice.
>
> See [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) for the accounts payable equivalent of bills.

View the coverage for invoices in the Data coverage explorer.

## Overview

An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/accounting-api#/schemas/Customer).

In Codat, an invoice contains details of:

- The timeline of the invoice—when it was raised, marked as paid, last edited, and so on.
- How much the invoice is for, what portion of the invoice is tax or discounts, and what currency the amounts are represented in.
- Who the invoice has been raised to; the _customer_.
- The breakdown of what the invoice is for; the _line items_.
- Any [payments](https://docs.codat.io/accounting-api#/schemas/Payment) assigned to the invoice; the _payment allocations_.

> **Invoice PDF downloads**
>
> You can download a PDF version of an invoice for supported integrations.
>
> The filename will be invoice-{number}.pdf.

> **Referencing an invoice in Sage 50 and ClearBooks**
>
> In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createitemresponse.md b/previous-versions/accounting/docs/models/shared/createitemresponse.md index ba771f831..aba0bf9af 100755 --- a/previous-versions/accounting/docs/models/shared/createitemresponse.md +++ b/previous-versions/accounting/docs/models/shared/createitemresponse.md @@ -1,13 +1,11 @@ # CreateItemResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[Item]](../../models/shared/item.md) | :heavy_minus_sign: | > View the coverage for items in the Data coverage explorer.

## Overview

**Items** allow your customers to save and track details of the products and services that they buy and sell.
| | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createjournalentryresponse.md b/previous-versions/accounting/docs/models/shared/createjournalentryresponse.md index 1c94cd791..dee0841df 100755 --- a/previous-versions/accounting/docs/models/shared/createjournalentryresponse.md +++ b/previous-versions/accounting/docs/models/shared/createjournalentryresponse.md @@ -1,13 +1,11 @@ # CreateJournalEntryResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[JournalEntry]](../../models/shared/journalentry.md) | :heavy_minus_sign: | > **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) data type

> View the coverage for journal entries in the Data coverage explorer.

## Overview

A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/accounting-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance.

A journal entry line item is a single transaction line on the journal entry. For example:

- When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items.
- When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue.

In Codat a journal entry contains details of:

- The date on which the entry was created and posted.
- Itemised lines, including amounts and currency.
- A reference to the associated accounts.
- A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger.

> **Pushing journal entries**
> Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createjournalresponse.md b/previous-versions/accounting/docs/models/shared/createjournalresponse.md index 1ac9086ef..67ee8f368 100755 --- a/previous-versions/accounting/docs/models/shared/createjournalresponse.md +++ b/previous-versions/accounting/docs/models/shared/createjournalresponse.md @@ -1,13 +1,11 @@ # CreateJournalResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[Journal]](../../models/shared/journal.md) | :heavy_minus_sign: | > **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) data type

> View the coverage for journals in the Data coverage explorer.

## Overview

In accounting software, journals are used to record all the financial transactions of a company. Each transaction in a journal is represented by a separate [journal entry](https://docs.codat.io/accounting-api#/schemas/JournalEntry). These entries are used to create the general ledger, which is then used to create the financial statements of a business.

When a company records all their transactions in a single journal, it can become large and difficult to maintain and track. This is why large companies often use multiple journals (also known as subjournals) to categorize and manage journal entries.

Such journals can be divided into two categories:

- Special journals: journals used to record specific types of transactions; for example, a purchases journal, a sales journal, or a cash management journal.
- General journals: journals used to record transactions that fall outside the scope of the special journals.

Multiple journals or subjournals are used in the following Codat integrations:

- [Sage Intacct](https://docs.codat.io/integrations/accounting/sage-intacct/accounting-sage-intacct) (mandatory)
- [Exact Online](https://docs.codat.io/integrations/accounting/exact-online/accounting-exact-online) (mandatory)
- [Oracle NetSuite](https://docs.codat.io/integrations/accounting/netsuite/accounting-netsuite) (optional)

> When pushing journal entries to an accounting platform that doesn’t support multiple journals (multi-book accounting), the entries will be linked to the platform-generic journal. The Journals data type will only include one object.
| | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createpaymentresponse.md b/previous-versions/accounting/docs/models/shared/createpaymentresponse.md index 922edf0bf..e19e27f83 100755 --- a/previous-versions/accounting/docs/models/shared/createpaymentresponse.md +++ b/previous-versions/accounting/docs/models/shared/createpaymentresponse.md @@ -1,13 +1,11 @@ # CreatePaymentResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[Payment]](../../models/shared/payment.md) | :heavy_minus_sign: | > **Payments or bill payments?**
>
> In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/accounting-api#/schemas/Bill) and credit notes against bills.

> View the coverage for payments in the Data coverage explorer.

## Overview

Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote).

A payment in Codat usually represents an allocation of money within any customer accounts receivable account. This includes, but is not strictly limited to:

- A payment made against an invoice, like a credit card, cheque, or cash payment.
- An allocation of a customer's credit note, either to an invoice or maybe a refund.
- A payment made directly to that accounts receivable account. This might be an overpayment or a prepayment. It might also be the refund of a payment made directly to an accounts receivable account.

Depending on the payments allowed by the underlying accounting package, some payment types may be combined. Please see the example for more details.

In Codat, a payment contains details of:

- When the payment was recorded in the accounting system.
- How much it is for and in what currency that amount is in.
- Who the payment was _paid by_ – the _customer_.
- The payment method used.
- The breakdown of the types of payments – the _line items_.

Payments is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction).

## Payment types

## Payment of an invoice

A payment paying a single invoice has one entry in its `lines` array. This **line** has the following properties:

- An _amount_ that indicates the amount of the invoice that was paid. This is always positive.
- A **links** array containing one element with the following properties:
- A **type** that indicates the type of **link**, in this case an `Invoice`.
- An **id** that contains the ID of the invoice that was paid.
- An **amount** for the link. The sum of the **line.amount** and the **links.amount** must equal `0`.

The **amount** field on the **line** equals the **totalAmount** on the payment.

## Payment of multiple invoices

A single payment can pay multiple invoices. This can be represented in one of two formats depending on how the customer keeps their books:

- The payment has multiple entries in its **lines** array, one for each invoice that is paid. Each line follows the example and rules described in [Payment of an invoice](#payment-of-an-invoice).
- The payment has a line with multiple links to each invoice. This occurs when the proportion of the original payment allocated to each invoice is not available.

Each **line** has the same properties as those described in [Payment of an invoice](#payment-of-an-invoice), with the **amount** indicating how much of the payment was allocated to the invoice. The sum of line amounts equals the **totalAmount** on the payment.

## Payments and refunds on account

A payment on account, that is a payment that doesn’t pay a specific invoice, has one entry in its lines array. The **line** has the following properties:

- A **totalAmount** that indicates the amount paid by a customer or refunded to them by a company. A payment to the customer is always negative. A refund is always positive.
- A **links** array containing one element with the following properties:
- A **type** that indicates the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`.
- The **id** containing the ID of the customer.
- The **amount** for the link is `0` – the **totalAmount** _or_ the amount of the payment or refund.

It is possible to have a payment that is part _on account_ and part _allocated_ to an invoice. Each line should follow the examples above.

## Using a credit note to pay an invoice

The payment of an invoice using a credit note has one entry in its **lines** array. This **line** has the following properties:

- An **amount** that indicates the amount of money moved, which in this case is `0`, as the credit note and invoice allocation must balance each other.
- A **links** array containing two elements:
- The first **link** has:
- A **type** that indicates the type of **link**, in this case an `Invoice`.
- An **id** that contains the ID of the invoice that was paid.
- The second **link** has:
- A **type** that indicates the type of **link**, in this case a `CreditNote`.
- An **id** that contains the ID of the credit note used by this payment.

The **amount** field on the **line** equals the **totalAmount** on the payment.

## Refunding a credit note

A payment refunding a credit note has one entry in its **lines** array. This **line** has the following properties:

- An **amount** that indicates the amount of the credit note that was refunded. This is always negative for a refund.
- A **links** array that contains one element with the following properties:
- A **type** that indicates the type of **link**, in this case a `CreditNote`.
- An **id** that contains the ID of the credit note that was refunded.

The **totalAmount** field on the payment equals the **amount** field of the **line**. These are both negative, as this is money leaving accounts receivable.

## Refunding a payment

If a payment is refunded, for example, if a customer overpaid an invoice and the overpayment is returned to the customer, there are two payment records:

- One for the incoming over payment.
- Another for the outgoing refund.

The payment issuing the refund has a negative **totalAmount**. This payment also has one entry in its lines array with the following properties:

- An **amount** that indicates the amount that was refunded. This is always negative.
- A **links** array that contains one element with the following properties:
- A **type** that indicates the type of **link**, in this case a `Payment`.
- An **id** that contains the ID of the payment that was refunded.

The **amount** field on the **line** equals the **totalAmount** on the payment and is negative, as this is money leaving accounts receivable.

The payment that was refunded has a line where the **amount** is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was used to partly pay an invoice.

For example: A £1,050 payment on a £1,000 invoice with a refund of £50 has two lines:

- One for £1,000 linked to the invoice that was paid.
- Another for £50 linked to the payment that refunded the overpayment with a** type** of `Refund` and an ID that corresponds to the payment.

The **line** linked to the payment has the following properties:

- An **amount** that indicates the amount that was refunded. This is positive as its money that was added to accounts receivable. It's balanced out by the negative amount of the refund.
- A **links** array containing one element with the following properties:
- A **type** that indicates the type of **link**, in this case a `Refund`.
- An **id** that contains the ID of the payment that refunded this line.

> **Support for linked payments**
>
> Not all accounting packages support linking payments in this way. In some platforms, you may see a payment on account and a refund on account.

## Foreign currencies

There are two types of currency rate that are included in the payments data type:

Payment currency rate:

- Base currency of the accounts receivable account.
- Foreign currency of the payment.

Payment line link currency rate:

- Base currency of the item the link represents.
- Foreign currency of the payment.

These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a payment is applied to an item in a currency that doesn't match either:

- The base currency for the accounts receivable account.
- The currency of the item.

```json title="Currency rate example"
{
"id": "123",
"note": ""
"totalAmount": 99.99,
"currency": "GBP",
"lines": [
{
"amount": 99.99,
"links": [
{
"type": "Invoice",
"id": "178",
"amount": -50,
"currencyRate": 1.9998,
}
]
}
]
}
```



## Example data

> **Object properties**
>
> For the sake of brevity, the examples here may omit properties from objects. For the full object definition, see [Payments](https://api.codat.io/swagger/index.html#/Payments).

## Simple examples

```json title="Payment for invoice"
{
"totalAmount": 1000,
"lines": [
{
"amount" : 1000,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
}
]
}
]
}
```



```json title="Allocation of credit note"
{
"totalAmount": 0,
"lines": [
{
"amount" : 0,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
},
{
"type" : "CreditNote",
"id" : "y",
"amount" : 1000
}
]
}
]
}
```



```json title="Payment of invoice and payment on account"
{
"totalAmount": 2000,
"lines": [
{
"amount" : 1000,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
}
]
},
{
"amount" : 1000,
"links" : [
{
"type" : "PaymentOnAccount",
"id" : "y",
"amount" : -1000
}
]
}
]
}
```



```json title="Refund of credit note"
{
"totalAmount": -1000,
"lines": [
{
"amount" : -1000,
"links" : [
{
"type" : "CreditNote",
"id" : "y",
"amount" : 1000
}
]
}
]
}
```



```json title="Refund on accounts receivable account"
{
"totalAmount": -1000,
"lines": [
{
"amount" : -1000,
"links" : [
{
"type" : "PaymentOnAccount",
"id" : "y",
"amount" : 1000
}
]
}
]
}
```



```json title="Linked refund on accounts receivable account"
{
"id" : "payment-001",
"totalAmount": 1000,
"lines": [
{
"amount" : 1000,
"links" : [
{
"type" : "Refund",
"id" : "refund-001",
"amount" : -1000
}
]
}
]
}
{
"id" : "refund-001",
"totalAmount": -1000,
"lines": [
{
"amount" : -1000,
"links" : [
{
"type" : "Payment",
"id" : "payment-001",
"amount" : 1000
}
]
}
]
}
```



```json title="Using a credit note and cash to pay an invoice"
{
"totalAmount": 250,
"lines": [
{
"amount": 0,
"links": [
{
"type": "Invoice",
"id": "x",
"amount": -750
},
{
"type": "CreditNote",
"id": "y",
"amount": 750
}
]
},
{
"amount": 250,
"links": [
{
"type": "Invoice",
"id": "x",
"amount": -250
}
]
}
]
}
```



## Complex examples

```json title="Use two credit notes and 1000 in to "bank" (cash, cheque etc.) to pay invoice"
{
"totalAmount": 1000,
"lines": [
{
"amount" : 0,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
},
{
"type" : "CreditNote",
"id" : "y",
"amount" : 1000
}
]
},
{
"amount" : 0,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
},
{
"type" : "CreditNote",
"id" : "z",
"amount" : 1000
}
]
},
{
"amount" : 1000,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
}
]
}
]
}
```



```json title="Pay an invoice with two credit notes and cash, with 1000 left 'on account'"
{
"totalAmount": 2000,
"lines": [
{
"amount" : 0,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
},
{
"type" : "CreditNote",
"id" : "y",
"amount" : 1000
}
]
},
{
"amount" : 0,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
},
{
"type" : "CreditNote",
"id" : "z",
"amount" : 1000
}
]
},
{
"amount" : 1000,
"links" : [
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
}
]
},
{
"amount" : 1000,
"links" : [
{
"type" : "PaymentOnAccount",
"id" : "customer-001",
"amount" : -1000
}
]
}
]
}
```



```json title="Two credit notes pay two invoices with no allocation amount specified"
{
"totalAmount": 0,
"lines": [
{
"amount" : 0,
"links" : [
{
"type" : "Invoice",
"id" : "w",
"amount" : -1000
},
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
},
{
"type" : "CreditNote",
"id" : "y",
"amount" : 1000
},
{
"type" : "CreditNote",
"id" : "z",
"amount" : 1000
}
]
}
]
}
```



```json title="Two credit notes and cash pay three invoices with no allocation amount specified, and refund cash"
{
"totalAmount": 2000,
"lines": [
{
"amount" : 1000,
"links" : [
{
"type" : "Invoice",
"id" : "w",
"amount" : -1000
},
{
"type" : "Invoice",
"id" : "x",
"amount" : -1000
},
{
"type" : "Invoice",
"id" : "u",
"amount" : -1000
},
{
"type" : "CreditNote",
"id" : "y",
"amount" : 1000
},
{
"type" : "CreditNote",
"id" : "z",
"amount" : 1000
}
]
},
{
"amount" : 1000,
"links" : [
{
"type" : "Refund",
"id" : "refund-001",
"amount" : -1000
}
]
}
]
}
{
"id" : "refund-001",
"totalAmount": -1000,
"lines": [
{
"amount" : -1000,
"links" : [
{
"type" : "Payment",
"id" : "payment-001",
"amount" : 1000
}
]
}
]
}
```



In this example, a payment on account is used to pay the same invoice in January and again in February.

```json title="January"
{
"id": "001",
"totalAmount": 5000,
"date" : "1901-01-01",
"lines": [
{
"amount" : 1000,
"links" : [
{
"type" : "Invoice",
"id" : "Invoice-x",
"amount" : -1000
}
]
},
{
"amount" : 4000,
"links" : [
{
"type" : "PaymentOnAccount",
"id" : "PaymentOnAccount-y",
"amount" : -4000
}
]
}
]
}
```



```json title="February"
{
"id": "001",
"totalAmount": 5000,
"date" : "1901-02-01",
"lines": [
{
"amount" : 1000,
"links" : [
{
"type" : "Invoice",
"id" : "Invoice-x",
"amount" : -1000
}
]
},
{
"amount" : 1000,
"links" : [
{
"type" : "Invoice",
"id" : "Invoice-y",
"amount" : -1000
}
]
},
{
"amount" : 3000,
"links" : [
{
"type" : "PaymentOnAccount",
"id" : "PaymentOnAccount-y",
"amount" : -3000
}
]
}
]
}
```



```json title="Two credit notes and some cash pay two invoices with no allocations specified"
{
"totalAmount": 500,
"lines": [
{
"amount": 500,
"links": [{
"type": "Invoice",
"id": "a",
"amount": -1000
}, {
"type": "Invoice",
"id": "b",
"amount": -1000
}, {
"type": "CreditNote",
"id": "y",
"amount": 750
},{
"type": "CreditNote",
"id": "z",
"amount": 750
}
]
}
]
}
``` | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createpurchaseorderresponse.md b/previous-versions/accounting/docs/models/shared/createpurchaseorderresponse.md index 195f9b913..4105cdc27 100755 --- a/previous-versions/accounting/docs/models/shared/createpurchaseorderresponse.md +++ b/previous-versions/accounting/docs/models/shared/createpurchaseorderresponse.md @@ -1,13 +1,11 @@ # CreatePurchaseOrderResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[PurchaseOrder]](../../models/shared/purchaseorder.md) | :heavy_minus_sign: | > View the coverage for purchase orders in the Data coverage explorer.

## Overview

Purchase orders represent a business's intent to purchase goods or services from a supplier and normally include information such as expected delivery dates and shipping details.

This information can be used to provide visibility on a business's expected payables and to track a purchase through the full procurement process. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createsupplierresponse.md b/previous-versions/accounting/docs/models/shared/createsupplierresponse.md index c1722b7f6..e7278343d 100755 --- a/previous-versions/accounting/docs/models/shared/createsupplierresponse.md +++ b/previous-versions/accounting/docs/models/shared/createsupplierresponse.md @@ -1,13 +1,11 @@ # CreateSupplierResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `data` | [Optional[Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | > 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/accounting-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/accounting-api#/schemas/Bill). | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/createtransferresponse.md b/previous-versions/accounting/docs/models/shared/createtransferresponse.md index 3f2142f76..ae043718b 100755 --- a/previous-versions/accounting/docs/models/shared/createtransferresponse.md +++ b/previous-versions/accounting/docs/models/shared/createtransferresponse.md @@ -1,13 +1,11 @@ # CreateTransferResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[Transfer]](../../models/shared/transfer.md) | :heavy_minus_sign: | > View the coverage for transfers in the Data coverage explorer.

A transfer records the movement of money between two bank accounts, or between a bank account and a nominal account. It is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/creditnote.md b/previous-versions/accounting/docs/models/shared/creditnote.md index ab0457d13..de481ed92 100755 --- a/previous-versions/accounting/docs/models/shared/creditnote.md +++ b/previous-versions/accounting/docs/models/shared/creditnote.md @@ -18,14 +18,14 @@ It contains details of: | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `additional_tax_amount` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `additional_tax_percentage` | *Optional[float]* | :heavy_minus_sign: | N/A | | +| `additional_tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | +| `additional_tax_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | | `allocated_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `credit_note_number` | *Optional[str]* | :heavy_minus_sign: | Friendly reference for the credit note. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | -| `customer_ref` | [Optional[CustomerRef]](../../models/shared/customerref.md) | :heavy_minus_sign: | N/A | | -| `discount_percentage` | *float* | :heavy_check_mark: | Percentage rate (from 0 to 100) of discounts applied to the credit note. | | +| `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 \| | | +| `customer_ref` | [Optional[AccountingCustomerRef]](../../models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | | +| `discount_percentage` | *Decimal* | :heavy_check_mark: | Percentage rate (from 0 to 100) of discounts applied to the credit note. | | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the credit note, unique to the company in the accounting platform. | | | `issue_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `line_items` | list[[CreditNoteLineItem](../../models/shared/creditnotelineitem.md)] | :heavy_minus_sign: | N/A | | @@ -33,12 +33,12 @@ It contains details of: | `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `note` | *Optional[str]* | :heavy_minus_sign: | Any additional information about the credit note. Where possible, Codat links to a data field in the accounting platform that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting platform to the customer. | | | `payment_allocations` | list[[Items](../../models/shared/items.md)] | :heavy_minus_sign: | An array of payment allocations. | | -| `remaining_credit` | *float* | :heavy_check_mark: | Unused balance of totalAmount originally raised. | | +| `remaining_credit` | *Decimal* | :heavy_check_mark: | Unused balance of totalAmount originally raised. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `status` | [CreditNoteStatus](../../models/shared/creditnotestatus.md) | :heavy_check_mark: | N/A | | -| `sub_total` | *float* | :heavy_check_mark: | Value of the credit note, including discounts and excluding tax. | | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | -| `total_amount` | *float* | :heavy_check_mark: | Total amount of credit that has been applied to the customer's accounts receivable | | -| `total_discount` | *float* | :heavy_check_mark: | Any discounts applied to the credit note amount. | | -| `total_tax_amount` | *float* | :heavy_check_mark: | Any tax applied to the credit note amount. | | +| `sub_total` | *Decimal* | :heavy_check_mark: | Value of the credit note, including discounts and excluding tax. | | +| `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. | | +| `total_amount` | *Decimal* | :heavy_check_mark: | Total amount of credit that has been applied to the customer's accounts receivable | | +| `total_discount` | *Decimal* | :heavy_check_mark: | Any discounts applied to the credit note amount. | | +| `total_tax_amount` | *Decimal* | :heavy_check_mark: | Any tax applied to the credit note amount. | | | `withholding_tax` | list[[WithholdingTaxitems](../../models/shared/withholdingtaxitems.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/creditnotelineitem.md b/previous-versions/accounting/docs/models/shared/creditnotelineitem.md index 39e68b6f2..fe31de891 100755 --- a/previous-versions/accounting/docs/models/shared/creditnotelineitem.md +++ b/previous-versions/accounting/docs/models/shared/creditnotelineitem.md @@ -7,15 +7,15 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Friendly name of each line item. For example, the goods or service for which credit has been issued. | -| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Value of any discounts applied. | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | +| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Value of any discounts applied. | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | | `is_direct_income` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | N/A | -| `quantity` | *float* | :heavy_check_mark: | Number of units of the goods or service for which credit has been issued. | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | -| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax associated with the line item. | +| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of the goods or service for which credit has been issued. | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | +| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax associated with the line item. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | | `tracking` | [Optional[CreditNoteLineItemTracking]](../../models/shared/creditnotelineitemtracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | -| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible.

Reference to the tracking categories to which the line item is linked. | -| `unit_amount` | *float* | :heavy_check_mark: | Unit price of the goods or service. | \ No newline at end of file +| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Reference to the tracking categories to which the line item is linked. | +| `unit_amount` | *Decimal* | :heavy_check_mark: | Unit price of the goods or service. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/creditnotelineitemtracking.md b/previous-versions/accounting/docs/models/shared/creditnotelineitemtracking.md index 8882e2c94..cfaf5f499 100755 --- a/previous-versions/accounting/docs/models/shared/creditnotelineitemtracking.md +++ b/previous-versions/accounting/docs/models/shared/creditnotelineitemtracking.md @@ -5,10 +5,11 @@ Categories, and a project and customer, against which the item is tracked. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A | -| `customer_ref` | [Optional[CustomerRef]](../../models/shared/customerref.md) | :heavy_minus_sign: | N/A | -| `is_billed_to` | [BilledToType1](../../models/shared/billedtotype1.md) | :heavy_check_mark: | N/A | -| `is_rebilled_to` | [BilledToType1](../../models/shared/billedtotype1.md) | :heavy_check_mark: | N/A | -| `project_ref` | [Optional[ProjectRef]](../../models/shared/projectref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A | +| `customer_ref` | [Optional[AccountingCustomerRef]](../../models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | +| `is_billed_to` | [BilledToType1](../../models/shared/billedtotype1.md) | :heavy_check_mark: | N/A | +| `is_rebilled_to` | [BilledToType1](../../models/shared/billedtotype1.md) | :heavy_check_mark: | N/A | +| `project_ref` | [Optional[ProjectRef]](../../models/shared/projectref.md) | :heavy_minus_sign: | N/A | +| `record_ref` | [Optional[InvoiceTo]](../../models/shared/invoiceto.md) | :heavy_minus_sign: | Links the current record to the underlying record or data type that created it.

For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/creditnotes.md b/previous-versions/accounting/docs/models/shared/creditnotes.md index 2394b377e..08c73f50a 100755 --- a/previous-versions/accounting/docs/models/shared/creditnotes.md +++ b/previous-versions/accounting/docs/models/shared/creditnotes.md @@ -1,7 +1,5 @@ # CreditNotes -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/customer.md b/previous-versions/accounting/docs/models/shared/customer.md index 4074df4b6..45c062938 100755 --- a/previous-versions/accounting/docs/models/shared/customer.md +++ b/previous-versions/accounting/docs/models/shared/customer.md @@ -27,5 +27,5 @@ Customers' data links to accounts receivable [invoices](https://docs.codat.io/ac | `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/additional-data) about supplemental data. | | +| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `tax_number` | *Optional[str]* | :heavy_minus_sign: | Company tax number. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/customers.md b/previous-versions/accounting/docs/models/shared/customers.md index c71d6dc21..eebee2b84 100755 --- a/previous-versions/accounting/docs/models/shared/customers.md +++ b/previous-versions/accounting/docs/models/shared/customers.md @@ -1,7 +1,5 @@ # Customers -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/dataset.md b/previous-versions/accounting/docs/models/shared/dataset.md index 950d5ff9a..44424109b 100755 --- a/previous-versions/accounting/docs/models/shared/dataset.md +++ b/previous-versions/accounting/docs/models/shared/dataset.md @@ -1,7 +1,5 @@ # Dataset -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/directcost.md b/previous-versions/accounting/docs/models/shared/directcost.md index 3849c7940..02012c19c 100755 --- a/previous-versions/accounting/docs/models/shared/directcost.md +++ b/previous-versions/accounting/docs/models/shared/directcost.md @@ -6,6 +6,8 @@ ## Overview +Direct costs are the expenses associated with a business' operations. For example, purchases of raw materials and service fees are considered direct costs. + Direct costs include: * Purchasing an item and paying it off at the point of the purchase * Receiving cash from a refunded item if the refund is made by the supplier @@ -21,7 +23,7 @@ Direct costs is a child data type of [account transactions](https://docs.codat.i | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contact_ref` | [Optional[ContactRef]](../../models/shared/contactref.md) | :heavy_minus_sign: | The customer or supplier for the transfer, if available. | | | `currency` | *str* | :heavy_check_mark: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of the direct cost, unique for the company. | | | `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 | | `line_items` | list[[DirectCostLineItem](../../models/shared/directcostlineitem.md)] | :heavy_check_mark: | An array of line items. | | @@ -31,7 +33,7 @@ Direct costs is a child data type of [account transactions](https://docs.codat.i | `payment_allocations` | list[[Items](../../models/shared/items.md)] | :heavy_check_mark: | An array of payment allocations. | | | `reference` | *Optional[str]* | :heavy_minus_sign: | User-friendly reference for the direct cost. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `sub_total` | *float* | :heavy_check_mark: | The total amount of the direct costs, excluding any taxes. | | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | -| `tax_amount` | *float* | :heavy_check_mark: | The total amount of tax on the direct costs. | | -| `total_amount` | *float* | :heavy_check_mark: | The amount of the direct costs, inclusive of tax. | | \ No newline at end of file +| `sub_total` | *Decimal* | :heavy_check_mark: | The total amount of the direct costs, excluding any taxes. | | +| `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. | | +| `tax_amount` | *Decimal* | :heavy_check_mark: | The total amount of tax on the direct costs. | | +| `total_amount` | *Decimal* | :heavy_check_mark: | The amount of the direct costs, inclusive of tax. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/directcostlineitem.md b/previous-versions/accounting/docs/models/shared/directcostlineitem.md index e0ca056db..b401948ec 100755 --- a/previous-versions/accounting/docs/models/shared/directcostlineitem.md +++ b/previous-versions/accounting/docs/models/shared/directcostlineitem.md @@ -7,14 +7,14 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Friendly name of the goods or services. | -| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Discount amount for the line before tax. | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Discount percentage for the line before tax. | +| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Discount amount for the line before tax. | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Discount percentage for the line before tax. | | `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | N/A | -| `quantity` | *float* | :heavy_check_mark: | Number of units of goods or services received.

Note: If the platform does not provide this information, the quantity will be mapped as 1. | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | -| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax for the line. | +| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of goods or services received.

Note: If the platform does not provide this information, the quantity will be mapped as 1. | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax for the line. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line, including tax. | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line, including tax. | | `tracking` | [Optional[Tracking]](../../models/shared/tracking.md) | :heavy_minus_sign: | N/A | -| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible.

Collection of categories against which this direct cost is tracked. | -| `unit_amount` | *float* | :heavy_check_mark: | Price of each unit of goods or services.
Note: If the platform does not provide this information, the unit amount will be mapped to the total amount. | \ No newline at end of file +| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Collection of categories against which this direct cost is tracked. | +| `unit_amount` | *Decimal* | :heavy_check_mark: | Price of each unit of goods or services.
Note: If the platform does not provide this information, the unit amount will be mapped to the total amount. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/directcosts.md b/previous-versions/accounting/docs/models/shared/directcosts.md index d0d3f78cc..26989cf21 100755 --- a/previous-versions/accounting/docs/models/shared/directcosts.md +++ b/previous-versions/accounting/docs/models/shared/directcosts.md @@ -1,7 +1,5 @@ # DirectCosts -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/directincome.md b/previous-versions/accounting/docs/models/shared/directincome.md index 26bf326f6..96d80919a 100755 --- a/previous-versions/accounting/docs/models/shared/directincome.md +++ b/previous-versions/accounting/docs/models/shared/directincome.md @@ -6,6 +6,8 @@ ## Overview +Direct incomes are incomes received directly from the business' operations. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes. + Direct incomes include: - Selling an item directly to a contact, and receiving payment at the point of the sale. @@ -22,7 +24,7 @@ Direct incomes is a child data type of [account transactions](https://docs.codat | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contact_ref` | [Optional[ContactRef]](../../models/shared/contactref.md) | :heavy_minus_sign: | The customer or supplier for the transfer, if available. | | | `currency` | *str* | :heavy_check_mark: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of the direct income, unique for the company. | | | `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 | | `line_items` | list[[DirectIncomeLineItem](../../models/shared/directincomelineitem.md)] | :heavy_check_mark: | An array of line items. | | @@ -32,7 +34,7 @@ Direct incomes is a child data type of [account transactions](https://docs.codat | `payment_allocations` | list[[Items](../../models/shared/items.md)] | :heavy_check_mark: | N/A | | | `reference` | *Optional[str]* | :heavy_minus_sign: | User-friendly reference for the direct income. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `sub_total` | *float* | :heavy_check_mark: | The total amount of the direct incomes, excluding any taxes. | | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | -| `tax_amount` | *float* | :heavy_check_mark: | The total amount of tax on the direct incomes. | | -| `total_amount` | *float* | :heavy_check_mark: | The amount of the direct incomes, inclusive of tax. | | \ No newline at end of file +| `sub_total` | *Decimal* | :heavy_check_mark: | The total amount of the direct incomes, excluding any taxes. | | +| `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. | | +| `tax_amount` | *Decimal* | :heavy_check_mark: | The total amount of tax on the direct incomes. | | +| `total_amount` | *Decimal* | :heavy_check_mark: | The amount of the direct incomes, inclusive of tax. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/directincomelineitem.md b/previous-versions/accounting/docs/models/shared/directincomelineitem.md index 29ebb7af4..b3d42cbed 100755 --- a/previous-versions/accounting/docs/models/shared/directincomelineitem.md +++ b/previous-versions/accounting/docs/models/shared/directincomelineitem.md @@ -7,13 +7,13 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | A user-friendly name of the goods or services. | -| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Discount amount for the line before tax. | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Discount percentage for the line before tax. | +| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Discount amount for the line before tax. | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Discount percentage for the line before tax. | | `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | N/A | -| `quantity` | *float* | :heavy_check_mark: | The number of units of goods or services received.

Note: If the platform does not provide this information, the quantity will be mapped as 1. | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | The amount of the line, inclusive of discounts, but exclusive of tax. | -| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | The amount of tax for the line.
Note: If the platform does not provide this information, the quantity will be mapped as 0.00. | +| `quantity` | *Decimal* | :heavy_check_mark: | The number of units of goods or services received.

Note: If the platform does not provide this information, the quantity will be mapped as 1. | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | The amount of the line, inclusive of discounts, but exclusive of tax. | +| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | The amount of tax for the line.
Note: If the platform does not provide this information, the quantity will be mapped as 0.00. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount of the line, including tax. | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | The total amount of the line, including tax. | | `tracking_category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | An array of categories against which this direct cost is tracked. | -| `unit_amount` | *float* | :heavy_check_mark: | The price of each unit of goods or services.
Note: If the platform does not provide this information, the unit amount will be mapped to the total amount. | \ No newline at end of file +| `unit_amount` | *Decimal* | :heavy_check_mark: | The price of each unit of goods or services.
Note: If the platform does not provide this information, the unit amount will be mapped to the total amount. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/directincomes.md b/previous-versions/accounting/docs/models/shared/directincomes.md index 7507e0134..a4a1e1d35 100755 --- a/previous-versions/accounting/docs/models/shared/directincomes.md +++ b/previous-versions/accounting/docs/models/shared/directincomes.md @@ -1,7 +1,5 @@ # DirectIncomes -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/schema.md b/previous-versions/accounting/docs/models/shared/errormessage.md similarity index 93% rename from previous-versions/accounting/docs/models/shared/schema.md rename to previous-versions/accounting/docs/models/shared/errormessage.md index fae3ca376..4f34c9a64 100755 --- a/previous-versions/accounting/docs/models/shared/schema.md +++ b/previous-versions/accounting/docs/models/shared/errormessage.md @@ -1,6 +1,4 @@ -# Schema - -Your `query` parameter was not correctly formed +# ErrorMessage ## Fields diff --git a/previous-versions/accounting/docs/models/shared/invoice.md b/previous-versions/accounting/docs/models/shared/invoice.md index b2ad538f9..d4f85ff08 100755 --- a/previous-versions/accounting/docs/models/shared/invoice.md +++ b/previous-versions/accounting/docs/models/shared/invoice.md @@ -35,13 +35,13 @@ In Codat, an invoice contains details of: | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `additional_tax_amount` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `additional_tax_percentage` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `amount_due` | *float* | :heavy_check_mark: | Amount outstanding on the invoice. | | +| `additional_tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | +| `additional_tax_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | N/A | | +| `amount_due` | *Decimal* | :heavy_check_mark: | Amount outstanding on the invoice. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | -| `customer_ref` | [Optional[CustomerRef]](../../models/shared/customerref.md) | :heavy_minus_sign: | N/A | | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of discounts applied to the invoice. For example: A 5% discount will return a value of `5`, not `0.05`. | | +| `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 \| | | +| `customer_ref` | [Optional[AccountingCustomerRef]](../../models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of discounts applied to the invoice. For example: A 5% discount will return a value of `5`, not `0.05`. | | | `due_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 | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the invoice, unique to the company in the accounting platform. | | | `invoice_number` | *Optional[str]* | :heavy_minus_sign: | Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. | | @@ -55,9 +55,9 @@ In Codat, an invoice contains details of: | `sales_order_refs` | list[[SalesOrderRef](../../models/shared/salesorderref.md)] | :heavy_minus_sign: | List of references to related Sales orders. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `status` | [InvoiceStatus](../../models/shared/invoicestatus.md) | :heavy_check_mark: | Current state of the invoice:

- `Draft` - Invoice hasn't been submitted to the supplier. It may be in a pending state or is scheduled for future submission, for example by email.
- `Submitted` - Invoice is no longer a draft. It has been processed and, or, sent to the customer. In this state, it will impact the ledger. It also has no payments made against it (amountDue == totalAmount).
- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount (0 < amountDue < totalAmount).
- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid (amountDue == 0).
- `Void` - An invoice can become Void when it's deleted, refunded, written off, or cancelled. A voided invoice may still be PartiallyPaid, and so all outstanding amounts on voided invoices are removed from the accounts receivable account. | | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Total amount of the invoice excluding any taxes. | | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | -| `total_amount` | *float* | :heavy_check_mark: | Amount of the invoice, inclusive of tax. | | -| `total_discount` | *Optional[float]* | :heavy_minus_sign: | Numerical value of discounts applied to the invoice. | | -| `total_tax_amount` | *float* | :heavy_check_mark: | Amount of tax on the invoice. | | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the invoice excluding any taxes. | | +| `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. | | +| `total_amount` | *Decimal* | :heavy_check_mark: | Amount of the invoice, inclusive of tax. | | +| `total_discount` | *Optional[Decimal]* | :heavy_minus_sign: | Numerical value of discounts applied to the invoice. | | +| `total_tax_amount` | *Decimal* | :heavy_check_mark: | Amount of tax on the invoice. | | | `withholding_tax` | list[[WithholdingTaxitems](../../models/shared/withholdingtaxitems.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/invoiceitem.md b/previous-versions/accounting/docs/models/shared/invoiceitem.md index 7adf63b65..d694e6982 100755 --- a/previous-versions/accounting/docs/models/shared/invoiceitem.md +++ b/previous-versions/accounting/docs/models/shared/invoiceitem.md @@ -10,4 +10,4 @@ Item details that are only for bills. | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Short description of the product or service that has been bought by the customer. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `unit_price` | *Optional[float]* | :heavy_minus_sign: | Unit price of the product or service. | \ No newline at end of file +| `unit_price` | *Optional[Decimal]* | :heavy_minus_sign: | Unit price of the product or service. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/invoicelineitem.md b/previous-versions/accounting/docs/models/shared/invoicelineitem.md index 67f6181ae..7526b343a 100755 --- a/previous-versions/accounting/docs/models/shared/invoicelineitem.md +++ b/previous-versions/accounting/docs/models/shared/invoicelineitem.md @@ -7,15 +7,15 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Friendly name of the goods or services provided. | -| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Numerical value of any discounts applied. | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any discounts applied to the unit amount. | +| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Numerical value of any discounts applied. | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any discounts applied to the unit amount. | | `is_direct_income` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | N/A | -| `quantity` | *float* | :heavy_check_mark: | Number of units of goods or services provided. | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | -| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax for the line. | +| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of goods or services provided. | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax for the line. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line, including tax. When pushing invoices to Xero, the total amount is exclusive of tax to allow automatic calculations if a tax rate or tax amount is not specified. | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line, including tax. When pushing invoices to Xero, the total amount is exclusive of tax to allow automatic calculations if a tax rate or tax amount is not specified. | | `tracking` | [Optional[Propertiestracking1]](../../models/shared/propertiestracking1.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | -| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible.

Reference to the tracking categories to which the line item is linked. | -| `unit_amount` | *float* | :heavy_check_mark: | Price of each unit of goods or services. | \ No newline at end of file +| ~~`tracking_category_refs`~~ | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Reference to the tracking categories to which the line item is linked. | +| `unit_amount` | *Decimal* | :heavy_check_mark: | Price of each unit of goods or services. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/invoices.md b/previous-versions/accounting/docs/models/shared/invoices.md index 6d0d3d438..d290d03db 100755 --- a/previous-versions/accounting/docs/models/shared/invoices.md +++ b/previous-versions/accounting/docs/models/shared/invoices.md @@ -1,7 +1,5 @@ # Invoices -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/invoiceto.md b/previous-versions/accounting/docs/models/shared/invoiceto.md index 6c3cfee10..7cc066bad 100755 --- a/previous-versions/accounting/docs/models/shared/invoiceto.md +++ b/previous-versions/accounting/docs/models/shared/invoiceto.md @@ -1,18 +1,13 @@ # InvoiceTo -Links to the underlying record or data type. +Links the current record to the underlying record or data type that created it. -Found on: - -- Journal entries -- Account transactions -- Invoices -- Transfers +For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `data_type` | *Optional[str]* | :heavy_minus_sign: | Name of the 'dataType'. | -| `id` | *Optional[str]* | :heavy_minus_sign: | 'id' of the underlying record or data type. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `data_type` | *Optional[str]* | :heavy_minus_sign: | Allowed name of the 'dataType'. | journalEntry | +| `id` | *Optional[str]* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/items1.md b/previous-versions/accounting/docs/models/shared/items1.md index ec1562bde..1d7a92548 100755 --- a/previous-versions/accounting/docs/models/shared/items1.md +++ b/previous-versions/accounting/docs/models/shared/items1.md @@ -1,7 +1,5 @@ # Items1 -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/itemsallocation.md b/previous-versions/accounting/docs/models/shared/itemsallocation.md index 1678c4912..94c6b4893 100755 --- a/previous-versions/accounting/docs/models/shared/itemsallocation.md +++ b/previous-versions/accounting/docs/models/shared/itemsallocation.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `allocated_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/journalentries.md b/previous-versions/accounting/docs/models/shared/journalentries.md index 8da6895b4..3e4ad1eed 100755 --- a/previous-versions/accounting/docs/models/shared/journalentries.md +++ b/previous-versions/accounting/docs/models/shared/journalentries.md @@ -1,7 +1,5 @@ # JournalEntries -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/journalentry.md b/previous-versions/accounting/docs/models/shared/journalentry.md index 1ac4d5719..29a3cb21d 100755 --- a/previous-versions/accounting/docs/models/shared/journalentry.md +++ b/previous-versions/accounting/docs/models/shared/journalentry.md @@ -36,7 +36,7 @@ In Codat a journal entry contains details of: | `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 | | `posted_on` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `record_ref` | [Optional[InvoiceTo]](../../models/shared/invoiceto.md) | :heavy_minus_sign: | Links to the underlying record or data type.

Found on:

- Journal entries
- Account transactions
- Invoices
- Transfers | | +| `record_ref` | [Optional[InvoiceTo]](../../models/shared/invoiceto.md) | :heavy_minus_sign: | Links the current record to the underlying record or data type that created it.

For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | +| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `updated_on` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/journalline.md b/previous-versions/accounting/docs/models/shared/journalline.md index 91a8f50a6..8c0e0e396 100755 --- a/previous-versions/accounting/docs/models/shared/journalline.md +++ b/previous-versions/accounting/docs/models/shared/journalline.md @@ -8,5 +8,5 @@ | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `currency` | *Optional[str]* | :heavy_minus_sign: | Currency for the journal line item. | | `description` | *Optional[str]* | :heavy_minus_sign: | Description of the journal line item. | -| `net_amount` | *float* | :heavy_check_mark: | Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. | +| `net_amount` | *Decimal* | :heavy_check_mark: | Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. | | `tracking` | [Optional[Propertiestracking2]](../../models/shared/propertiestracking2.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/journals.md b/previous-versions/accounting/docs/models/shared/journals.md index 281db1f21..b6b1f628a 100755 --- a/previous-versions/accounting/docs/models/shared/journals.md +++ b/previous-versions/accounting/docs/models/shared/journals.md @@ -1,7 +1,5 @@ # Journals -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/payment.md b/previous-versions/accounting/docs/models/shared/payment.md index c645e0f58..5a2833d35 100755 --- a/previous-versions/accounting/docs/models/shared/payment.md +++ b/previous-versions/accounting/docs/models/shared/payment.md @@ -686,16 +686,16 @@ In this example, a payment on account is used to pay the same invoice in January | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | -| `customer_ref` | [Optional[CustomerRef]](../../models/shared/customerref.md) | :heavy_minus_sign: | N/A | | +| `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 \| | | +| `customer_ref` | [Optional[AccountingCustomerRef]](../../models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | | | `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 | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the payment, unique to the company in the accounting platform. | | | `lines` | list[[PaymentLine](../../models/shared/paymentline.md)] | :heavy_minus_sign: | An array of payment lines. | | | `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 | | `note` | *Optional[str]* | :heavy_minus_sign: | Any additional information associated with the payment. | | -| `payment_method_ref` | [Optional[PaymentMethodRef]](../../models/shared/paymentmethodref.md) | :heavy_minus_sign: | N/A | | +| `payment_method_ref` | *Optional[Any]* | :heavy_minus_sign: | N/A | | | `reference` | *Optional[str]* | :heavy_minus_sign: | Friendly reference for the payment. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of the payment in the payment currency. This value should never change and represents the amount of money paid into the customer's account. | | \ No newline at end of file +| `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. | | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the payment in the payment currency. This value should never change and represents the amount of money paid into the customer's account. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/paymentallocationpayment.md b/previous-versions/accounting/docs/models/shared/paymentallocationpayment.md index 7c7dab9fc..dca76f389 100755 --- a/previous-versions/accounting/docs/models/shared/paymentallocationpayment.md +++ b/previous-versions/accounting/docs/models/shared/paymentallocationpayment.md @@ -7,9 +7,9 @@ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

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

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier of the allocated payment. | | | `note` | *Optional[str]* | :heavy_minus_sign: | Notes attached to the allocated payment. | | | `paid_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `reference` | *Optional[str]* | :heavy_minus_sign: | Reference to the allocated payment. | | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount that was paid. | | \ No newline at end of file +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount that was paid. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/paymentline.md b/previous-versions/accounting/docs/models/shared/paymentline.md index 316922a9b..af0fe8ddf 100755 --- a/previous-versions/accounting/docs/models/shared/paymentline.md +++ b/previous-versions/accounting/docs/models/shared/paymentline.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `allocated_on_date` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `amount` | *float* | :heavy_check_mark: | Amount in the payment currency. | | +| `amount` | *Decimal* | :heavy_check_mark: | Amount in the payment currency. | | | `links` | list[[PaymentLineLink](../../models/shared/paymentlinelink.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/paymentlinelink.md b/previous-versions/accounting/docs/models/shared/paymentlinelink.md index 603baf72a..785e93142 100755 --- a/previous-versions/accounting/docs/models/shared/paymentlinelink.md +++ b/previous-versions/accounting/docs/models/shared/paymentlinelink.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amount` | *Optional[float]* | :heavy_minus_sign: | Amount by which the balance of the linked entity is altered, in the currency of the linked entity.
A negative link amount _reduces_ the outstanding amount on the accounts receivable account.
A positive link amount _increases_ the outstanding amount on the accounts receivable account. | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | +| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount by which the balance of the linked entity is altered, in the currency of the linked entity.
A negative link amount _reduces_ the outstanding amount on the accounts receivable account.
A positive link amount _increases_ the outstanding amount on the accounts receivable account. | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the transaction represented by the link. | | `type` | [PaymentLinkType](../../models/shared/paymentlinktype.md) | :heavy_check_mark: | Types of payment line links, either:
`Unknown`
`Unlinked` - Not used
`Invoice` - ID refers to the invoice
`CreditNote` - ID refers to the credit note
`Refund` - ID refers to the sibling payment
`Payment` - ID refers to the sibling payment
`PaymentOnAccount` - ID refers to the customer
`Other` - ID refers to the customer
`Manual Journal`
`Discount` - ID refers to the payment | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/paymentmethodref.md b/previous-versions/accounting/docs/models/shared/paymentmethodref.md deleted file mode 100755 index 641b0945f..000000000 --- a/previous-versions/accounting/docs/models/shared/paymentmethodref.md +++ /dev/null @@ -1,9 +0,0 @@ -# PaymentMethodRef - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `id` | *Optional[str]* | :heavy_minus_sign: | `id` from the Payment Methods data type | -| `name` | *Optional[str]* | :heavy_minus_sign: | `name` from the Payment Methods data type | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/paymentmethods.md b/previous-versions/accounting/docs/models/shared/paymentmethods.md index abbd8439c..fc831fcfa 100755 --- a/previous-versions/accounting/docs/models/shared/paymentmethods.md +++ b/previous-versions/accounting/docs/models/shared/paymentmethods.md @@ -1,7 +1,5 @@ # PaymentMethods -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/payments.md b/previous-versions/accounting/docs/models/shared/payments.md index a0f6f88a9..dd71dbb3d 100755 --- a/previous-versions/accounting/docs/models/shared/payments.md +++ b/previous-versions/accounting/docs/models/shared/payments.md @@ -1,7 +1,5 @@ # Payments -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/profitandlossreport.md b/previous-versions/accounting/docs/models/shared/profitandlossreport.md index 976faa1d0..ed6a18505 100755 --- a/previous-versions/accounting/docs/models/shared/profitandlossreport.md +++ b/previous-versions/accounting/docs/models/shared/profitandlossreport.md @@ -8,11 +8,11 @@ | `cost_of_sales` | [Optional[ReportLine]](../../models/shared/reportline.md) | :heavy_minus_sign: | N/A | | | `expenses` | [Optional[ReportLine]](../../models/shared/reportline.md) | :heavy_minus_sign: | N/A | | | `from_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 | -| `gross_profit` | *float* | :heavy_check_mark: | Gross profit of the company in the given date range. | | +| `gross_profit` | *Decimal* | :heavy_check_mark: | Gross profit of the company in the given date range. | | | `income` | [Optional[ReportLine]](../../models/shared/reportline.md) | :heavy_minus_sign: | N/A | | -| `net_operating_profit` | *float* | :heavy_check_mark: | Net operating profit of the company in the given date range. | | -| `net_other_income` | *float* | :heavy_check_mark: | Net other income of the company in the given date range. | | -| `net_profit` | *float* | :heavy_check_mark: | Net profit of the company in the given date range. | | +| `net_operating_profit` | *Decimal* | :heavy_check_mark: | Net operating profit of the company in the given date range. | | +| `net_other_income` | *Decimal* | :heavy_check_mark: | Net other income of the company in the given date range. | | +| `net_profit` | *Decimal* | :heavy_check_mark: | Net profit of the company in the given date range. | | | `other_expenses` | [Optional[ReportLine]](../../models/shared/reportline.md) | :heavy_minus_sign: | N/A | | | `other_income` | [Optional[ReportLine]](../../models/shared/reportline.md) | :heavy_minus_sign: | N/A | | | `to_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 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/propertiestracking.md b/previous-versions/accounting/docs/models/shared/propertiestracking.md index 974cc4a9d..e897dc5bb 100755 --- a/previous-versions/accounting/docs/models/shared/propertiestracking.md +++ b/previous-versions/accounting/docs/models/shared/propertiestracking.md @@ -5,10 +5,10 @@ Categories, and a project and customer, against which the item is tracked. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A | -| `customer_ref` | [Optional[CustomerRef]](../../models/shared/customerref.md) | :heavy_minus_sign: | N/A | -| `is_billed_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A | -| `is_rebilled_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A | -| `project_ref` | [Optional[ProjectRef]](../../models/shared/projectref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A | +| `customer_ref` | [Optional[AccountingCustomerRef]](../../models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | +| `is_billed_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A | +| `is_rebilled_to` | [BilledToType](../../models/shared/billedtotype.md) | :heavy_check_mark: | N/A | +| `project_ref` | [Optional[ProjectRef]](../../models/shared/projectref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/propertiestracking1.md b/previous-versions/accounting/docs/models/shared/propertiestracking1.md index d91ec2f12..01000599f 100755 --- a/previous-versions/accounting/docs/models/shared/propertiestracking1.md +++ b/previous-versions/accounting/docs/models/shared/propertiestracking1.md @@ -5,10 +5,11 @@ Categories, and a project and customer, against which the item is tracked. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A | -| `customer_ref` | [Optional[CustomerRef]](../../models/shared/customerref.md) | :heavy_minus_sign: | N/A | -| `is_billed_to` | [BilledToType1](../../models/shared/billedtotype1.md) | :heavy_check_mark: | N/A | -| `is_rebilled_to` | [BilledToType1](../../models/shared/billedtotype1.md) | :heavy_check_mark: | N/A | -| `project_ref` | [Optional[ProjectRef]](../../models/shared/projectref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_check_mark: | N/A | +| `customer_ref` | [Optional[AccountingCustomerRef]](../../models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | +| `is_billed_to` | [BilledToType1](../../models/shared/billedtotype1.md) | :heavy_check_mark: | N/A | +| `is_rebilled_to` | [BilledToType1](../../models/shared/billedtotype1.md) | :heavy_check_mark: | N/A | +| `project_ref` | [Optional[ProjectRef]](../../models/shared/projectref.md) | :heavy_minus_sign: | N/A | +| `record_ref` | [Optional[InvoiceTo]](../../models/shared/invoiceto.md) | :heavy_minus_sign: | Links the current record to the underlying record or data type that created it.

For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/purchaseorder.md b/previous-versions/accounting/docs/models/shared/purchaseorder.md index 95ced1b3e..519c903ef 100755 --- a/previous-versions/accounting/docs/models/shared/purchaseorder.md +++ b/previous-versions/accounting/docs/models/shared/purchaseorder.md @@ -14,7 +14,7 @@ This information can be used to provide visibility on a business's expected paya | 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 | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `delivery_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 | | `expected_delivery_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 | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the purchase order, unique for the company in the accounting platform. | | @@ -28,8 +28,8 @@ This information can be used to provide visibility on a business's expected paya | `ship_to` | [Optional[ShipTo]](../../models/shared/shipto.md) | :heavy_minus_sign: | Delivery details for any goods that have been ordered. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `status` | [Optional[PurchaseOrderStatus]](../../models/shared/purchaseorderstatus.md) | :heavy_minus_sign: | Current state of the purchase order | | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Total amount of the purchase order, including discounts but excluding tax. | | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the purchase order, including discounts but excluding tax. | | | `supplier_ref` | [Optional[SupplierRef]](../../models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the purchase order, including discounts and tax. | | -| `total_discount` | *Optional[float]* | :heavy_minus_sign: | Total value of any discounts applied to the purchase order. | | -| `total_tax_amount` | *Optional[float]* | :heavy_minus_sign: |
Total amount of tax included in the purchase order. | | \ No newline at end of file +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the purchase order, including discounts and tax. | | +| `total_discount` | *Optional[Decimal]* | :heavy_minus_sign: | Total value of any discounts applied to the purchase order. | | +| `total_tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: |
Total amount of tax included in the purchase order. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/purchaseorderlineitem.md b/previous-versions/accounting/docs/models/shared/purchaseorderlineitem.md index de3c0ea06..cdb712fde 100755 --- a/previous-versions/accounting/docs/models/shared/purchaseorderlineitem.md +++ b/previous-versions/accounting/docs/models/shared/purchaseorderlineitem.md @@ -7,13 +7,13 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Description of the goods / services that have been ordered. | -| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Value of any discounts applied. | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any discounts applied to the unit amount. | +| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Value of any discounts applied. | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any discounts applied to the unit amount. | | `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | N/A | -| `quantity` | *Optional[float]* | :heavy_minus_sign: | Number of units that have been ordered. | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | -| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax for the line. | +| `quantity` | *Optional[Decimal]* | :heavy_minus_sign: | Number of units that have been ordered. | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax for the line. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line, inclusive of discounts and tax. | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line, inclusive of discounts and tax. | | `tracking_category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | Reference to the tracking categories to which the line item is linked. | -| `unit_amount` | *Optional[float]* | :heavy_minus_sign: | Price of each unit. | \ No newline at end of file +| `unit_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Price of each unit. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/purchaseorders.md b/previous-versions/accounting/docs/models/shared/purchaseorders.md index 4f6effe72..e15eafde8 100755 --- a/previous-versions/accounting/docs/models/shared/purchaseorders.md +++ b/previous-versions/accounting/docs/models/shared/purchaseorders.md @@ -1,7 +1,5 @@ # PurchaseOrders -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/pushoperationsummary.md b/previous-versions/accounting/docs/models/shared/pushoperationsummary.md index 9f4e4406b..d84387756 100755 --- a/previous-versions/accounting/docs/models/shared/pushoperationsummary.md +++ b/previous-versions/accounting/docs/models/shared/pushoperationsummary.md @@ -1,13 +1,11 @@ # PushOperationSummary -OK - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | @@ -18,5 +16,5 @@ OK | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/pushoption.md b/previous-versions/accounting/docs/models/shared/pushoption.md index 5a6b4939e..a9a0e479a 100755 --- a/previous-versions/accounting/docs/models/shared/pushoption.md +++ b/previous-versions/accounting/docs/models/shared/pushoption.md @@ -1,7 +1,5 @@ # PushOption -OK - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/reportline.md b/previous-versions/accounting/docs/models/shared/reportline.md index 52c15b026..c16cd346b 100755 --- a/previous-versions/accounting/docs/models/shared/reportline.md +++ b/previous-versions/accounting/docs/models/shared/reportline.md @@ -8,4 +8,4 @@ | `account_id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting platform. | | `items` | list[[ReportLine](../../models/shared/reportline.md)] | :heavy_minus_sign: | An array of ReportLine items. | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of the report line item. | -| `value` | *float* | :heavy_check_mark: | Numerical value of the line item. | \ No newline at end of file +| `value` | *Decimal* | :heavy_check_mark: | Numerical value of the line item. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/salesorder.md b/previous-versions/accounting/docs/models/shared/salesorder.md index c83a25b48..927bfbd23 100755 --- a/previous-versions/accounting/docs/models/shared/salesorder.md +++ b/previous-versions/accounting/docs/models/shared/salesorder.md @@ -14,9 +14,9 @@ A sales order is typically converted to an [invoice](https://docs.codat.io/accou | 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 | -| `currency_rate` | *Optional[float]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currency_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

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

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

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

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

## Examples with base currency of GBP

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

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `customer_purchase_order_number` | *Optional[str]* | :heavy_minus_sign: | A customer-supplied identifier for the purchase order in the customer's system. | | -| `customer_ref` | [Optional[CustomerRef]](../../models/shared/customerref.md) | :heavy_minus_sign: | N/A | | +| `customer_ref` | [Optional[AccountingCustomerRef]](../../models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | | | `expected_delivery_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 | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the sales order, unique for the company in the accounting platform. | | | `invoicing_status` | [Optional[SalesOrderInvoiceStatus]](../../models/shared/salesorderinvoicestatus.md) | :heavy_minus_sign: | If the sales order is converted to an invoice, or will be in future, the invoicingStatus field indicates the current stage of the invoicing process. | | @@ -29,7 +29,7 @@ A sales order is typically converted to an [invoice](https://docs.codat.io/accou | `ship_to` | [Optional[SalesOrderShipTo]](../../models/shared/salesordershipto.md) | :heavy_minus_sign: | Delivery details for any goods that have been ordered. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `status` | [Optional[SalesOrderStatus]](../../models/shared/salesorderstatus.md) | :heavy_minus_sign: | Current state of the sales order. | | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Total amount of the sales order, including discounts but excluding tax. | | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the sales order, including discounts and tax. | | -| `total_discount` | *Optional[float]* | :heavy_minus_sign: |
Total value of any discounts applied to the sales order. | | -| `total_tax_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of tax included in the sales order. | | \ No newline at end of file +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the sales order, including discounts but excluding tax. | | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the sales order, including discounts and tax. | | +| `total_discount` | *Optional[Decimal]* | :heavy_minus_sign: |
Total value of any discounts applied to the sales order. | | +| `total_tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of tax included in the sales order. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/salesorderlineitem.md b/previous-versions/accounting/docs/models/shared/salesorderlineitem.md index 989f97070..71d7925c9 100755 --- a/previous-versions/accounting/docs/models/shared/salesorderlineitem.md +++ b/previous-versions/accounting/docs/models/shared/salesorderlineitem.md @@ -7,13 +7,13 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | `description` | *Optional[str]* | :heavy_minus_sign: | Description of the goods or services that have been ordered. | -| `discount_amount` | *Optional[float]* | :heavy_minus_sign: | Value of any discounts applied. | -| `discount_percentage` | *Optional[float]* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any discounts applied to the unit amount. | +| `discount_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Value of any discounts applied. | +| `discount_percentage` | *Optional[Decimal]* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of any discounts applied to the unit amount. | | `item_ref` | [Optional[ItemRef]](../../models/shared/itemref.md) | :heavy_minus_sign: | N/A | -| `quantity` | *Optional[float]* | :heavy_minus_sign: | Number of units that have been ordered. | -| `sub_total` | *Optional[float]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | -| `tax_amount` | *Optional[float]* | :heavy_minus_sign: | Amount of tax for the line. | +| `quantity` | *Optional[Decimal]* | :heavy_minus_sign: | Number of units that have been ordered. | +| `sub_total` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `tax_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Amount of tax for the line. | | `tax_rate_ref` | [Optional[TaxRateRef]](../../models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | -| `total_amount` | *Optional[float]* | :heavy_minus_sign: | Total amount of the line, inclusive of discounts and tax. | +| `total_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Total amount of the line, inclusive of discounts and tax. | | `tracking` | [Optional[SalesOrderLineItemTracking]](../../models/shared/salesorderlineitemtracking.md) | :heavy_minus_sign: | N/A | -| `unit_amount` | *Optional[float]* | :heavy_minus_sign: | Price of each unit. | \ No newline at end of file +| `unit_amount` | *Optional[Decimal]* | :heavy_minus_sign: | Price of each unit. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/salesorders.md b/previous-versions/accounting/docs/models/shared/salesorders.md index cdf3d350b..0a72bfc0f 100755 --- a/previous-versions/accounting/docs/models/shared/salesorders.md +++ b/previous-versions/accounting/docs/models/shared/salesorders.md @@ -1,7 +1,5 @@ # SalesOrders -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/supplementaldata.md b/previous-versions/accounting/docs/models/shared/supplementaldata.md index 2a938b3cf..f18fbb90d 100755 --- a/previous-versions/accounting/docs/models/shared/supplementaldata.md +++ b/previous-versions/accounting/docs/models/shared/supplementaldata.md @@ -2,7 +2,7 @@ Supplemental data is additional data you can include in our standard data types. -It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. +It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. ## Fields diff --git a/previous-versions/accounting/docs/models/shared/supplier.md b/previous-versions/accounting/docs/models/shared/supplier.md index 2638c5107..53fcf1150 100755 --- a/previous-versions/accounting/docs/models/shared/supplier.md +++ b/previous-versions/accounting/docs/models/shared/supplier.md @@ -9,19 +9,19 @@ From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addresses` | list[[Addressesitems](../../models/shared/addressesitems.md)] | :heavy_minus_sign: | An array of Addresses. | | -| `contact_name` | *Optional[str]* | :heavy_minus_sign: | Name of the main contact for the supplier. | | -| `default_currency` | *Optional[str]* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | -| `email_address` | *Optional[str]* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | -| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting platform. | | -| `metadata` | [Optional[Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | -| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `phone` | *Optional[str]* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +44 25691 154789 | -| `registration_number` | *Optional[str]* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | -| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `status` | [SupplierStatus](../../models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | -| `supplier_name` | *Optional[str]* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | -| `tax_number` | *Optional[str]* | :heavy_minus_sign: | Supplier's company tax number. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `addresses` | list[[Addressesitems](../../models/shared/addressesitems.md)] | :heavy_minus_sign: | An array of Addresses. | | +| `contact_name` | *Optional[str]* | :heavy_minus_sign: | Name of the main contact for the supplier. | | +| `default_currency` | *Optional[str]* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | +| `email_address` | *Optional[str]* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | +| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting platform. | | +| `metadata` | [Optional[Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | +| `phone` | *Optional[str]* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +44 25691 154789 | +| `registration_number` | *Optional[str]* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | +| `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | +| `status` | [SupplierStatus](../../models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | +| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | +| `supplier_name` | *Optional[str]* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | +| `tax_number` | *Optional[str]* | :heavy_minus_sign: | Supplier's company tax number. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/suppliers.md b/previous-versions/accounting/docs/models/shared/suppliers.md index 88c7249aa..2c8d57400 100755 --- a/previous-versions/accounting/docs/models/shared/suppliers.md +++ b/previous-versions/accounting/docs/models/shared/suppliers.md @@ -1,7 +1,5 @@ # Suppliers -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/taxrate.md b/previous-versions/accounting/docs/models/shared/taxrate.md index f187d588e..6209cff73 100755 --- a/previous-versions/accounting/docs/models/shared/taxrate.md +++ b/previous-versions/accounting/docs/models/shared/taxrate.md @@ -28,12 +28,12 @@ In some cases, a tax is made up of multiple sub taxes, often called _components_ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `code` | *Optional[str]* | :heavy_minus_sign: | Code for the tax rate from the accounting platform. | | | `components` | list[[TaxRateComponent](../../models/shared/taxratecomponent.md)] | :heavy_minus_sign: | N/A | | -| `effective_tax_rate` | *Optional[float]* | :heavy_minus_sign: | See Effective tax rates description. | | +| `effective_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | See Effective tax rates description. | | | `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the tax rate, unique for the company in the accounting platform. | | | `metadata` | [Optional[Metadata]](../../models/shared/metadata.md) | :heavy_minus_sign: | N/A | | | `modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `name` | *Optional[str]* | :heavy_minus_sign: | Codat-augmented name of the tax rate in the accounting platform. | | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | | `status` | [Optional[TaxRateStatus]](../../models/shared/taxratestatus.md) | :heavy_minus_sign: | Status of the tax rate in the accounting platform.
- `Active` - An active tax rate in use by a company.
- `Archived` - A tax rate that has been archived or is inactive in the accounting platform.
- `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform. | | -| `total_tax_rate` | *Optional[float]* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | | +| `total_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | | | `valid_datatype_links` | list[[ValidDataTypeLinks](../../models/shared/validdatatypelinks.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/taxratecomponent.md b/previous-versions/accounting/docs/models/shared/taxratecomponent.md index 148878a7e..c82ee7bb5 100755 --- a/previous-versions/accounting/docs/models/shared/taxratecomponent.md +++ b/previous-versions/accounting/docs/models/shared/taxratecomponent.md @@ -9,4 +9,4 @@ A tax rate can be made up of multiple sub taxes, often called components of the | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `is_compound` | *bool* | :heavy_check_mark: | A flag to indicate with the tax is calculated using the principle of compounding. | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of the tax rate component. | -| `rate` | *Optional[float]* | :heavy_minus_sign: | The rate of the tax rate component, usually a percentage. | \ No newline at end of file +| `rate` | *Optional[Decimal]* | :heavy_minus_sign: | The rate of the tax rate component, usually a percentage. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/taxrateref.md b/previous-versions/accounting/docs/models/shared/taxrateref.md index 22e79fc30..5b7eb1cd9 100755 --- a/previous-versions/accounting/docs/models/shared/taxrateref.md +++ b/previous-versions/accounting/docs/models/shared/taxrateref.md @@ -16,6 +16,6 @@ Found on: | Field | Type | Required | Description | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `effective_tax_rate` | *Optional[float]* | :heavy_minus_sign: | Applicable tax rate. | +| `effective_tax_rate` | *Optional[Decimal]* | :heavy_minus_sign: | Applicable tax rate. | | `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the tax rate in the accounting platform. | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of the tax rate in the accounting platform. | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/taxrates.md b/previous-versions/accounting/docs/models/shared/taxrates.md index 39ab1328f..c570791a4 100755 --- a/previous-versions/accounting/docs/models/shared/taxrates.md +++ b/previous-versions/accounting/docs/models/shared/taxrates.md @@ -1,7 +1,5 @@ # TaxRates -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/tracking.md b/previous-versions/accounting/docs/models/shared/tracking.md index 065cd549b..993b23119 100755 --- a/previous-versions/accounting/docs/models/shared/tracking.md +++ b/previous-versions/accounting/docs/models/shared/tracking.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `invoice_to` | [Optional[TrackingRecordReference]](../../models/shared/trackingrecordreference.md) | :heavy_minus_sign: | Links to the underlying record or data type.

Found on:

- Journal entries
- Account transactions
- Invoices
- Transfers | -| `record_refs` | list[[InvoiceTo](../../models/shared/invoiceto.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `invoice_to` | [Optional[TrackingRecordReference]](../../models/shared/trackingrecordreference.md) | :heavy_minus_sign: | Links the current record to the underlying record or data type that created it.

For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. | +| `record_refs` | list[[InvoiceTo](../../models/shared/invoiceto.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/trackingcategories.md b/previous-versions/accounting/docs/models/shared/trackingcategories.md index 091e6623c..f328dbae4 100755 --- a/previous-versions/accounting/docs/models/shared/trackingcategories.md +++ b/previous-versions/accounting/docs/models/shared/trackingcategories.md @@ -1,7 +1,5 @@ # TrackingCategories -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/trackingcategory.md b/previous-versions/accounting/docs/models/shared/trackingcategory.md index 5c640b079..2762dcc7a 100755 --- a/previous-versions/accounting/docs/models/shared/trackingcategory.md +++ b/previous-versions/accounting/docs/models/shared/trackingcategory.md @@ -21,6 +21,108 @@ From their accounting system, customers can: - View the categories that a transaction belongs to. - View all transactions in a tracking category. +### Tracking categories per platform + +Review the platform-specific tracking categories that Codat supports, and the level they are assigned to in the source platform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformTracking categoryTracking level
Dynamics 365DimensionsLine item
FreshbooksExpense categoriesLine item
MYOBCategoriesTransaction
NetsuiteClassesLine item
LocationsLine item
DepartmentsLine item
Custom segmentsLine item
QuickBooks DesktopClassesLine item or transaction level
LocationsTransaction
QuickBooks OnlineClassesLine item or transaction level
LocationsTransaction
Sage 200Cost centersLine item
DepartmentsLine item
Analysis codesTransaction
Sage 50DepartmentsLine item
CostcodesLine item
ProjectsLine item
Sage IntacctDimensionsLine item
XeroTracking categoriesLine item
+ > **Example use case** > > Monitor the budget for your annual conference using a tracking category called 'AnnualConference2020' with the **type** set to **Costing**. diff --git a/previous-versions/accounting/docs/models/shared/trackingcategoryref.md b/previous-versions/accounting/docs/models/shared/trackingcategoryref.md index d6343c607..c07926a39 100755 --- a/previous-versions/accounting/docs/models/shared/trackingcategoryref.md +++ b/previous-versions/accounting/docs/models/shared/trackingcategoryref.md @@ -2,6 +2,8 @@ References a category against which the item is tracked. +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + ## Fields diff --git a/previous-versions/accounting/docs/models/shared/trackingrecordreference.md b/previous-versions/accounting/docs/models/shared/trackingrecordreference.md index 0fdf5eb96..8a3dcfc67 100755 --- a/previous-versions/accounting/docs/models/shared/trackingrecordreference.md +++ b/previous-versions/accounting/docs/models/shared/trackingrecordreference.md @@ -1,18 +1,13 @@ # TrackingRecordReference -Links to the underlying record or data type. +Links the current record to the underlying record or data type that created it. -Found on: - -- Journal entries -- Account transactions -- Invoices -- Transfers +For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `data_type` | *Optional[str]* | :heavy_minus_sign: | Name of the 'dataType'. | -| `id` | *Optional[str]* | :heavy_minus_sign: | 'id' of the underlying record or data type. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `data_type` | *Optional[str]* | :heavy_minus_sign: | Allowed name of the 'dataType'. | journalEntry | +| `id` | *Optional[str]* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/transfer.md b/previous-versions/accounting/docs/models/shared/transfer.md index 62578db72..77c67c9f5 100755 --- a/previous-versions/accounting/docs/models/shared/transfer.md +++ b/previous-versions/accounting/docs/models/shared/transfer.md @@ -18,6 +18,6 @@ A transfer records the movement of money between two bank accounts, or between a | `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 | | `source_modified_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z | -| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. | | +| `supplemental_data` | [Optional[SupplementalData]](../../models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | | `to` | [Optional[TransferAccount]](../../models/shared/transferaccount.md) | :heavy_minus_sign: | N/A | | | `tracking_category_refs` | list[[TrackingCategoryRef](../../models/shared/trackingcategoryref.md)] | :heavy_minus_sign: | Reference to the tracking categories this transfer is being tracked against. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/transferaccount.md b/previous-versions/accounting/docs/models/shared/transferaccount.md index 60b3cf9d7..02b64ba18 100755 --- a/previous-versions/accounting/docs/models/shared/transferaccount.md +++ b/previous-versions/accounting/docs/models/shared/transferaccount.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_ref` | [Optional[AccountRef]](../../models/shared/accountref.md) | :heavy_minus_sign: | Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account. | | -| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount transferred between accounts. | | +| `amount` | *Optional[Decimal]* | :heavy_minus_sign: | The amount transferred between accounts. | | | `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 | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/transfers.md b/previous-versions/accounting/docs/models/shared/transfers.md index 5a481b2b2..06a6c85ff 100755 --- a/previous-versions/accounting/docs/models/shared/transfers.md +++ b/previous-versions/accounting/docs/models/shared/transfers.md @@ -1,7 +1,5 @@ # Transfers -Success - ## Fields diff --git a/previous-versions/accounting/docs/models/shared/updatebankaccountresponse.md b/previous-versions/accounting/docs/models/shared/updatebankaccountresponse.md index c8909f99e..1b124c6e1 100755 --- a/previous-versions/accounting/docs/models/shared/updatebankaccountresponse.md +++ b/previous-versions/accounting/docs/models/shared/updatebankaccountresponse.md @@ -1,23 +1,22 @@ # UpdateBankAccountResponse -Success - ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | -| `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[BankAccount]](../../models/shared/bankaccount.md) | :heavy_minus_sign: | > **Accessing Bank Accounts through Banking API**
>
> This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators.
>
> To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/schemas/Account)

> View the coverage for bank accounts in the Data coverage explorer.

## Overview

A list of bank accounts associated with a company and a specific data connection.

Bank accounts data includes:
* The name and ID of the account in the accounting platform.
* The currency and balance of the account.
* The sort code and account number. | | -| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | -| `error_message` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | -| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `status_code` | *int* | :heavy_check_mark: | N/A | | -| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | -| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dollar_ref` | *Optional[Any]* | :heavy_minus_sign: | N/A | | +| `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[Any]* | :heavy_minus_sign: | N/A | | +| `data_connection_key` | *str* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `data_type` | [Optional[DataType]](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `error_message` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `push_operation_key` | *str* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | +| `requested_on_utc` | *str* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | +| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | +| `status_code` | *int* | :heavy_check_mark: | N/A | | +| `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/updatebillcreditnoteresponse.md b/previous-versions/accounting/docs/models/shared/updatebillcreditnoteresponse.md index 21c673bb0..df4e8dcc1 100755 --- a/previous-versions/accounting/docs/models/shared/updatebillcreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/shared/updatebillcreditnoteresponse.md @@ -1,13 +1,11 @@ # UpdateBillCreditNoteResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[BillCreditNote]](../../models/shared/billcreditnote.md) | :heavy_minus_sign: | > **Bill credit notes or credit notes?**
>
> In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote).

View the coverage for bill credit notes in the Data coverage explorer.

## Overview

A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills.

In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier).

A bill credit note includes details of:
* The original and remaining credit.
* Any allocations of the credit against other records, such as [bills](https://docs.codat.io/accounting-api#/schemas/Bill).
* The supplier that issued the bill credit note. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/updatebillresponse.md b/previous-versions/accounting/docs/models/shared/updatebillresponse.md index b5800b2be..43669362a 100755 --- a/previous-versions/accounting/docs/models/shared/updatebillresponse.md +++ b/previous-versions/accounting/docs/models/shared/updatebillresponse.md @@ -1,13 +1,11 @@ # UpdateBillResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[Bill]](../../models/shared/bill.md) | :heavy_minus_sign: | > **Invoices or bills?**
>
> We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill.
>
> See [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) for the accounts receivable equivalent of bills.

View the coverage for bills in the Data coverage explorer.

## Overview

In Codat, a bill contains details of:
* When the bill was recorded in the accounting system.
* How much the bill is for and the currency of the amount.
* Who the bill was received from — the *supplier*.
* What the bill is for — the *line items*.

Some accounting platforms give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*.

You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/updatecreditnoteresponse.md b/previous-versions/accounting/docs/models/shared/updatecreditnoteresponse.md index 486621278..25ed99cd3 100755 --- a/previous-versions/accounting/docs/models/shared/updatecreditnoteresponse.md +++ b/previous-versions/accounting/docs/models/shared/updatecreditnoteresponse.md @@ -1,13 +1,11 @@ # UpdateCreditNoteResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[CreditNote]](../../models/shared/creditnote.md) | :heavy_minus_sign: | > View the coverage for credit notes in the Data coverage explorer.

## Overview

Think of a credit note as a voucher issued to a customer. It is a reduction that can be applied against one or multiple invoices. A credit note can either reduce the amount owed or cancel out an invoice entirely.

In the Codat system a credit note is issued to a [customer's](https://docs.codat.io/accounting-api#/schemas/Customer) accounts receivable.

It contains details of:
* The amount of credit remaining and its status.
* Payment allocations against the payments type, in this case an invoice.
* Which customers the credit notes have been issued to. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/updatecustomerresponse.md b/previous-versions/accounting/docs/models/shared/updatecustomerresponse.md index fb42edec2..7dc17815c 100755 --- a/previous-versions/accounting/docs/models/shared/updatecustomerresponse.md +++ b/previous-versions/accounting/docs/models/shared/updatecustomerresponse.md @@ -1,13 +1,11 @@ # UpdateCustomerResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `data` | [Optional[Customer]](../../models/shared/customer.md) | :heavy_minus_sign: | > 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/accounting-api#/schemas/Invoice).
| | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/updateinvoiceresponse.md b/previous-versions/accounting/docs/models/shared/updateinvoiceresponse.md index 27f363305..95a4a1576 100755 --- a/previous-versions/accounting/docs/models/shared/updateinvoiceresponse.md +++ b/previous-versions/accounting/docs/models/shared/updateinvoiceresponse.md @@ -1,13 +1,11 @@ # UpdateInvoiceResponse -Success - ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[Invoice]](../../models/shared/invoice.md) | :heavy_minus_sign: | > **Invoices or bills?**
>
> We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company issued an invoice, and is owed money (accounts receivable) we call this an Invoice.
>
> See [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) for the accounts payable equivalent of bills.

View the coverage for invoices in the Data coverage explorer.

## Overview

An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/accounting-api#/schemas/Customer).

In Codat, an invoice contains details of:

- The timeline of the invoice—when it was raised, marked as paid, last edited, and so on.
- How much the invoice is for, what portion of the invoice is tax or discounts, and what currency the amounts are represented in.
- Who the invoice has been raised to; the _customer_.
- The breakdown of what the invoice is for; the _line items_.
- Any [payments](https://docs.codat.io/accounting-api#/schemas/Payment) assigned to the invoice; the _payment allocations_.

> **Invoice PDF downloads**
>
> You can download a PDF version of an invoice for supported integrations.
>
> The filename will be invoice-{number}.pdf.

> **Referencing an invoice in Sage 50 and ClearBooks**
>
> In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/updatepurchaseorderresponse.md b/previous-versions/accounting/docs/models/shared/updatepurchaseorderresponse.md index b9cfad174..ca1f6f246 100755 --- a/previous-versions/accounting/docs/models/shared/updatepurchaseorderresponse.md +++ b/previous-versions/accounting/docs/models/shared/updatepurchaseorderresponse.md @@ -1,13 +1,11 @@ # UpdatePurchaseOrderResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `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[PurchaseOrder]](../../models/shared/purchaseorder.md) | :heavy_minus_sign: | > View the coverage for purchase orders in the Data coverage explorer.

## Overview

Purchase orders represent a business's intent to purchase goods or services from a supplier and normally include information such as expected delivery dates and shipping details.

This information can be used to provide visibility on a business's expected payables and to track a purchase through the full procurement process. | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/updatesupplierresponse.md b/previous-versions/accounting/docs/models/shared/updatesupplierresponse.md index db521f5a0..ba77e1827 100755 --- a/previous-versions/accounting/docs/models/shared/updatesupplierresponse.md +++ b/previous-versions/accounting/docs/models/shared/updatesupplierresponse.md @@ -1,13 +1,11 @@ # UpdateSupplierResponse -Success - ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | N/A | | +| `changes` | list[[PushOperationChange](../../models/shared/pushoperationchange.md)] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `company_id` | *str* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `completed_on_utc` | *Optional[str]* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

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



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

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

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `data` | [Optional[Supplier]](../../models/shared/supplier.md) | :heavy_minus_sign: | > 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/accounting-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/accounting-api#/schemas/Bill). | | @@ -19,5 +17,5 @@ Success | `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The status of the push operation. | | | `status_code` | *int* | :heavy_check_mark: | N/A | | | `timeout_in_minutes` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | :warning: **DEPRECATED**: this will be removed in a future release, please migrate away from it as soon as possible. | | +| ~~`timeout_in_seconds`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Optional[Validation]](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/previous-versions/accounting/docs/models/shared/withholdingtaxitems.md b/previous-versions/accounting/docs/models/shared/withholdingtaxitems.md index 6f338896d..6a0c34fb3 100755 --- a/previous-versions/accounting/docs/models/shared/withholdingtaxitems.md +++ b/previous-versions/accounting/docs/models/shared/withholdingtaxitems.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `amount` | *float* | :heavy_check_mark: | N/A | +| `amount` | *Decimal* | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/accounting/docs/sdks/accounts/README.md b/previous-versions/accounting/docs/sdks/accounts/README.md index 5571a1860..092d8e8dd 100755 --- a/previous-versions/accounting/docs/sdks/accounts/README.md +++ b/previous-versions/accounting/docs/sdks/accounts/README.md @@ -29,6 +29,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -39,10 +40,10 @@ s = codataccounting.CodatAccounting( req = operations.CreateAccountRequest( account=shared.Account( currency='EUR', - current_balance=0, + current_balance=Decimal('0'), description='Invoices the business has issued but has not yet collected payment on.', fully_qualified_category='Asset.Current', - fully_qualified_name='Asset.Current.Accounts Receivable', + fully_qualified_name='Fixed Asset', id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e', is_bank_account=False, metadata=shared.Metadata( @@ -57,32 +58,15 @@ req = operations.CreateAccountRequest( valid_datatype_links=[ shared.ValidDataTypeLinks( links=[ - 'vel', - 'error', - 'deserunt', - 'suscipit', + 'illum', ], - property='iure', - ), - shared.ValidDataTypeLinks( - links=[ - 'debitis', - 'ipsa', - ], - property='delectus', - ), - shared.ValidDataTypeLinks( - links=[ - 'suscipit', - 'molestiae', - ], - property='minus', + property='vel', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=812169, + timeout_in_minutes=623564, ) res = s.accounts.create(req) @@ -119,7 +103,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -128,7 +112,7 @@ s = codataccounting.CodatAccounting( ) req = operations.GetAccountRequest( - account_id='voluptatum', + account_id='deserunt', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) @@ -168,7 +152,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -212,7 +196,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -225,7 +209,7 @@ req = operations.ListAccountsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='iusto', + query='suscipit', ) res = s.accounts.list(req) diff --git a/previous-versions/accounting/docs/sdks/accounttransactions/README.md b/previous-versions/accounting/docs/sdks/accounttransactions/README.md index 44d4a197c..67bca2c28 100755 --- a/previous-versions/accounting/docs/sdks/accounttransactions/README.md +++ b/previous-versions/accounting/docs/sdks/accounttransactions/README.md @@ -24,7 +24,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -70,7 +70,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( diff --git a/previous-versions/accounting/docs/sdks/bankaccounts/README.md b/previous-versions/accounting/docs/sdks/bankaccounts/README.md index 08ba887d0..e0ac887d6 100755 --- a/previous-versions/accounting/docs/sdks/bankaccounts/README.md +++ b/previous-versions/accounting/docs/sdks/bankaccounts/README.md @@ -29,6 +29,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -38,28 +39,28 @@ s = codataccounting.CodatAccounting( req = operations.CreateBankAccountRequest( bank_account=shared.BankAccount( - account_name='accusantium', - account_number='iure', - account_type=shared.BankAccountBankAccountType.CREDIT, - available_balance=9883.74, - balance=9589.5, - currency='GBP', - i_ban='mollitia', - id='3a2fa946-7739-4251-aa52-c3f5ad019da1', - institution='reiciendis', + account_name='deleniti', + account_number='hic', + account_type=shared.BankAccountBankAccountType.DEBIT, + available_balance=Decimal('5218.48'), + balance=Decimal('1059.07'), + currency='USD', + i_ban='molestiae', + id='42cb7392-0592-4939-afea-7596eb10faaa', + institution='dolores', metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - nominal_code='vero', - overdraft_limit=4686.51, - sort_code='praesentium', + nominal_code='corporis', + overdraft_limit=Decimal('1289.26'), + sort_code='nobis', source_modified_date='2022-10-23T00:00:00.000Z', ), allow_sync_on_push_complete=False, company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=55714, + timeout_in_minutes=607831, ) res = s.bank_accounts.create(req) @@ -96,7 +97,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -105,7 +106,7 @@ s = codataccounting.CodatAccounting( ) req = operations.GetBankAccountRequest( - account_id='omnis', + account_id='nemo', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', ) @@ -146,7 +147,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -191,7 +192,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -205,7 +206,7 @@ req = operations.ListBankAccountsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='voluptate', + query='minima', ) res = s.bank_accounts.list(req) @@ -245,6 +246,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -254,29 +256,29 @@ s = codataccounting.CodatAccounting( req = operations.UpdateBankAccountRequest( bank_account=shared.BankAccount( - account_name='cum', - account_number='perferendis', - account_type=shared.BankAccountBankAccountType.UNKNOWN, - available_balance=4417.11, - balance=2828.07, + account_name='excepturi', + account_number='accusantium', + account_type=shared.BankAccountBankAccountType.CREDIT, + available_balance=Decimal('6342.74'), + balance=Decimal('9883.74'), currency='EUR', - i_ban='dicta', - id='5471b5e6-e13b-499d-888e-1e91e450ad2a', - institution='distinctio', + i_ban='architecto', + id='a3a2fa94-6773-4925-9aa5-2c3f5ad019da', + institution='quasi', metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - nominal_code='labore', - overdraft_limit=2647.3, - sort_code='qui', + nominal_code='voluptatibus', + overdraft_limit=Decimal('8781.94'), + sort_code='nihil', source_modified_date='2022-10-23T00:00:00.000Z', ), - bank_account_id='cupiditate', + bank_account_id='voluptatibus', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - timeout_in_minutes=552822, + timeout_in_minutes=55714, ) res = s.bank_accounts.update(req) diff --git a/previous-versions/accounting/docs/sdks/bankaccounttransactions/README.md b/previous-versions/accounting/docs/sdks/bankaccounttransactions/README.md index 22f37f886..b6ce3c0a2 100755 --- a/previous-versions/accounting/docs/sdks/bankaccounttransactions/README.md +++ b/previous-versions/accounting/docs/sdks/bankaccounttransactions/README.md @@ -28,6 +28,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -37,29 +38,22 @@ s = codataccounting.CodatAccounting( req = operations.CreateBankTransactionsRequest( create_bank_transactions=shared.CreateBankTransactions( - account_id='excepturi', + account_id='iure', transactions=[ shared.CreateBankAccountTransaction( - amount=9255.97, - balance=8360.79, + amount=Decimal('2975.34'), + balance=Decimal('8917.73'), date_='2022-10-23T00:00:00.000Z', - description='quis', - id='1a05dfc2-ddf7-4cc7-8ca1-ba928fc81674', - ), - shared.CreateBankAccountTransaction( - amount=1863.32, - balance=7742.34, - date_='2022-10-23T00:00:00.000Z', - description='esse', - id='39205929-396f-4ea7-996e-b10faaa2352c', + description='delectus', + id='467cc879-6ed1-451a-85df-c2ddf7cc78ca', ), ], ), - account_id='enim', + account_id='dicta', allow_sync_on_push_complete=False, company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=607831, + timeout_in_minutes=720633, ) res = s.bank_account_transactions.create(req) @@ -98,7 +92,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -107,7 +101,7 @@ s = codataccounting.CodatAccounting( ) req = operations.GetCreateBankTransactionsModelRequest( - account_id='nemo', + account_id='officia', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', ) @@ -146,7 +140,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -155,18 +149,18 @@ s = codataccounting.CodatAccounting( ) req = operations.ListBankAccountTransactionsRequest( - account_id='minima', + account_id='occaecati', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', order_by='-modifiedDate', page=1, page_size=100, - query='excepturi', + query='fugit', ) res = s.bank_account_transactions.list(req) -if res.bank_transactions_response is not None: +if res.bank_transactions is not None: # handle response ``` diff --git a/previous-versions/accounting/docs/sdks/billcreditnotes/README.md b/previous-versions/accounting/docs/sdks/billcreditnotes/README.md index 613e97011..0825ba035 100755 --- a/previous-versions/accounting/docs/sdks/billcreditnotes/README.md +++ b/previous-versions/accounting/docs/sdks/billcreditnotes/README.md @@ -11,6 +11,7 @@ Bill credit notes * [get_create_update_model](#get_create_update_model) - Get create/update bill credit note model * [list](#list) - List bill credit notes * [update](#update) - Update bill credit note +* [upload_attachment](#upload_attachment) - Upload bill credit note attachment ## create @@ -30,6 +31,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -41,74 +43,58 @@ req = operations.CreateBillCreditNoteRequest( bill_credit_note=shared.BillCreditNote( allocated_on_date='2022-10-23T00:00:00.000Z', bill_credit_note_number='91fe2a83-e161-4c21-929d-c5c10c4b07e5', - currency='GBP', - currency_rate=8289.4, - discount_percentage=0, + currency='USD', + currency_rate=Decimal('7392.64'), + discount_percentage=Decimal('0'), id='1509398f-98e2-436d-8a5d-c042e0c74ffc', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.BillCreditNoteLineItem( account_ref=shared.AccountRef( - id='2a94bb4f-63c9-469e-9a3e-fa77dfb14cd6', - name='Kayla Thompson', + id='074f1547-1b5e-46e1-bb99-d488e1e91e45', + name='Monique Spinka', ), - description='enim', - discount_amount=8817.36, - discount_percentage=9654.17, + description='distinctio', + discount_amount=Decimal('8413.86'), + discount_percentage=Decimal('2894.06'), item_ref=shared.ItemRef( - id='b9ba88f3-a669-4970-b4ba-4469b6e21419', - name='Ramona Lueilwitz MD', + id='4269802d-502a-494b-b4f6-3c969e9a3efa', + name='Arlene Stamm', ), - quantity=9689.62, - sub_total=6521.03, - tax_amount=3209.97, + quantity=Decimal('1162.02'), + sub_total=Decimal('2974.37'), + tax_amount=Decimal('7670.24'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=4314.18, - id='3e2516fe-4c8b-4711-a5b7-fd2ed028921c', - name='Ervin Schoen', + effective_tax_rate=Decimal('8137.98'), + id='66ae395e-fb9b-4a88-b3a6-6997074ba446', + name='Robin Keebler', ), - total_amount=1399.72, + total_amount=Decimal('1028.63'), tracking=shared.BillCreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='01fb576b-0d5f-40d3-8c5f-bb2587053202', - name='Darryl Fadel', - ), - shared.TrackingCategoryRef( - id='fe9b90c2-8909-4b3f-a49a-8d9cbf486333', - name='Tiffany Welch', + id='41959890-afa5-463e-a516-fe4c8b711e5b', + name='Kristie Spencer', ), ], - customer_ref=shared.CustomerRef( - company_name='voluptate', - id='7f3a4100-674e-4bf6-9280-d1ba77a89ebf', + customer_ref=shared.AccountingCustomerRef( + company_name='pariatur', + id='028921cd-dc69-4260-9fb5-76b0d5f0d30c', ), is_billed_to=shared.BilledToType.NOT_APPLICABLE, - is_rebilled_to=shared.BilledToType.UNKNOWN, + is_rebilled_to=shared.BilledToType.PROJECT, project_ref=shared.ProjectRef( - id='7ae4203c-e5e6-4a95-98a0-d446ce2af7a7', - name='Rosalie White', + id='bb258705-3202-4c73-95fe-9b90c28909b3', + name='Merle Gleichner', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='453f870b-326b-45a7-b429-cdb1a8422bb6', - name='Felicia Spencer', - ), - shared.TrackingCategoryRef( - id='22715bf0-cbb1-4e31-b8b9-0f3443a1108e', - name='Jodi Skiles', - ), - shared.TrackingCategoryRef( - id='4b921879-fce9-453f-b3ef-7fbc7abd74dd', - name='Dr. Faye Rutherford', - ), - shared.TrackingCategoryRef( - id='d2cff7c7-0a45-4626-9436-813f16d9f5fc', - name='Nathaniel Ryan', + id='8d9cbf48-6333-423f-9b77-f3a4100674eb', + name='Hector Mosciski', ), ], - unit_amount=3994.99, + unit_amount=Decimal('246.78'), ), ], metadata=shared.Metadata( @@ -121,75 +107,52 @@ req = operations.CreateBillCreditNoteRequest( allocation=shared.ItemsAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', currency='EUR', - currency_rate=2322.34, - total_amount=9262.13, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='250fb008-c42e-4141-aac3-66c8dd6b1442', - name='Jose Kreiger', - ), - currency='GBP', - currency_rate=4585.15, - id='78a7bd46-6d28-4c10-ab3c-dca4251904e5', - note='aspernatur', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='quo', - total_amount=4598.56, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', - currency='GBP', - currency_rate=7151.79, - total_amount=7997.96, + currency_rate=Decimal('6793.93'), + total_amount=Decimal('4785.96'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='7178e479-6f2a-470c-a882-82aa482562f2', - name='Rose Turner', + id='7a89ebf7-37ae-4420-bce5-e6a95d8a0d44', + name='Bernadette Torp', ), - currency='GBP', - currency_rate=4569.11, - id='ee17cbe6-1e6b-47b9-9bc0-ab3c20c4f378', - note='provident', + currency='EUR', + currency_rate=Decimal('4561.3'), + id='a73cf3be-453f-4870-b326-b5a73429cdb1', + note='laborum', paid_on_date='2022-10-23T00:00:00.000Z', - reference='nulla', - total_amount=5578.11, + reference='incidunt', + total_amount=Decimal('1320.68'), ), ), ], - remaining_credit=0, + remaining_credit=Decimal('0'), source_modified_date='2022-10-23T00:00:00.000Z', status=shared.BillCreditNoteStatus.PAID, - sub_total=805.78, + sub_total=Decimal('805.78'), supplemental_data=shared.SupplementalData( content={ - "a": { - "sint": 'pariatur', - "possimus": 'quia', - "eveniet": 'asperiores', + "distinctio": { + "facilis": 'aliquid', }, }, ), supplier_ref=shared.SupplierRef( - id='d121aa6f-1e67-44bd-b04f-15756082d68e', - supplier_name='dolorum', + id='79d23227-15bf-40cb-b1e3-1b8b90f3443a', + supplier_name='architecto', ), - total_amount=805.78, - total_discount=0, - total_tax_amount=0, + total_amount=Decimal('805.78'), + total_discount=Decimal('0'), + total_tax_amount=Decimal('0'), withholding_tax=[ shared.WithholdingTaxitems( - amount=6091.78, - name='Ms. Roger Strosin II', + amount=Decimal('630.38'), + name='Miss Billie Ward', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=86532, + timeout_in_minutes=785153, ) res = s.bill_credit_notes.create(req) @@ -226,7 +189,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -235,7 +198,7 @@ s = codataccounting.CodatAccounting( ) req = operations.GetBillCreditNoteRequest( - bill_credit_note_id='consectetur', + bill_credit_note_id='doloribus', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) @@ -275,7 +238,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -320,7 +283,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -333,7 +296,7 @@ req = operations.ListBillCreditNotesRequest( order_by='-modifiedDate', page=1, page_size=100, - query='adipisci', + query='ut', ) res = s.bill_credit_notes.list(req) @@ -373,6 +336,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -384,62 +348,58 @@ req = operations.UpdateBillCreditNoteRequest( bill_credit_note=shared.BillCreditNote( allocated_on_date='2022-10-23T00:00:00.000Z', bill_credit_note_number='91fe2a83-e161-4c21-929d-c5c10c4b07e5', - currency='EUR', - currency_rate=330.74, - discount_percentage=0, + currency='USD', + currency_rate=Decimal('1816.31'), + discount_percentage=Decimal('0'), id='1509398f-98e2-436d-8a5d-c042e0c74ffc', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.BillCreditNoteLineItem( account_ref=shared.AccountRef( - id='86a18403-94c2-4607-9f93-f5f0642dac7a', - name='Vernon Bergnaum', + id='879fce95-3f73-4ef7-bbc7-abd74dd39c0f', + name='Freda Cormier', ), - description='quod', - discount_amount=2883.98, - discount_percentage=704.47, + description='doloribus', + discount_amount=Decimal('4783.7'), + discount_percentage=Decimal('7535.7'), item_ref=shared.ItemRef( - id='3aa63aae-8d67-4864-9bb6-75fd5e60b375', - name='Carroll Gerhold', + id='70a45626-d436-4813-b16d-9f5fce6c5561', + name='Rosemary Ryan', ), - quantity=9689.72, - sub_total=6971.42, - tax_amount=9049.49, + quantity=Decimal('1324.87'), + sub_total=Decimal('3253.1'), + tax_amount=Decimal('534.27'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=8970.71, - id='41f33317-fe35-4b60-ab1e-a426555ba3c2', - name='Harvey Gulgowski', + effective_tax_rate=Decimal('9528.71'), + id='b008c42e-141a-4ac3-a6c8-dd6b14429074', + name='Esther Koch', ), - total_amount=8391.89, + total_amount=Decimal('6832.82'), tracking=shared.BillCreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='3b88f3a8-d8f5-4c0b-af2f-b7b194a276b2', - name='Geneva Bradtke', - ), - shared.TrackingCategoryRef( - id='e1f08f42-94e3-4698-b447-f603e8b445e8', - name='Della Muller', + id='7bd466d2-8c10-4ab3-8dca-4251904e523c', + name='Sophie Bayer', ), ], - customer_ref=shared.CustomerRef( - company_name='recusandae', - id='fd20e457-e185-48b6-a89f-be3a5aa8e482', + customer_ref=shared.AccountingCustomerRef( + company_name='dignissimos', + id='178e4796-f2a7-40c6-8828-2aa482562f22', ), - is_billed_to=shared.BilledToType.NOT_APPLICABLE, + is_billed_to=shared.BilledToType.UNKNOWN, is_rebilled_to=shared.BilledToType.PROJECT, project_ref=shared.ProjectRef( - id='0ab40750-88e5-4186-a065-e904f3b1194b', - name='Cameron Reilly', + id='9817ee17-cbe6-41e6-b7b9-5bc0ab3c20c4', + name='Glenn Koch', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='3a79f9df-e0ab-47da-8a50-ce187f86bc17', - name='Angelina Jenkins', + id='fd871f99-dd2e-4fd1-a1aa-6f1e674bdb04', + name='Samuel Hermiston', ), ], - unit_amount=8872.65, + unit_amount=Decimal('3917.74'), ), ], metadata=shared.Metadata( @@ -452,123 +412,54 @@ req = operations.UpdateBillCreditNoteRequest( allocation=shared.ItemsAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', currency='GBP', - currency_rate=1334.61, - total_amount=4044.25, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='f8d986e8-81ea-4d4f-8e10-12563f94e29e', - name='Arnold Ferry', - ), - currency='GBP', - currency_rate=1458.7, - id='a57a15be-3e06-4080-be2b-6e3ab8845f05', - note='perspiciatis', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='mollitia', - total_amount=3782.45, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', - currency='EUR', - currency_rate=9702.22, - total_amount=1746.58, + currency_rate=Decimal('8453.58'), + total_amount=Decimal('4012.59'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='a54a31e9-4764-4a3e-865e-7956f9251a5a', - name='Rufus Okuneva', + id='8ea19f1d-1705-4133-9d08-086a1840394c', + name='Loretta Anderson DVM', ), - currency='GBP', - currency_rate=9992.78, - id='f57bfaad-4f9e-4fc1-b451-2c1032648dc2', - note='sapiente', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='dicta', - total_amount=3251.18, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', currency='USD', - currency_rate=5896.95, - total_amount=9364.69, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='bfd0e9fe-6c63-42ca-baed-0117996312fd', - name='Jeffrey Goldner', - ), - currency='GBP', - currency_rate=4797.54, - id='78ff61d0-1747-4636-8a15-db6a660659a1', - note='error', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='voluptates', - total_amount=6534.21, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', - currency='EUR', - currency_rate=3240.83, - total_amount=5369.23, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='51d6c645-b08b-4618-91ba-a0fe1ade008e', - name='Miranda Ledner', - ), - currency='EUR', - currency_rate=1905.67, - id='50d8cdb5-a341-4814-b010-421813d5208e', - note='impedit', + currency_rate=Decimal('2446.51'), + id='f5f0642d-ac7a-4f51-9cc4-13aa63aae8d6', + note='ducimus', paid_on_date='2022-10-23T00:00:00.000Z', - reference='esse', - total_amount=8972.77, + reference='vel', + total_amount=Decimal('2870.51'), ), ), ], - remaining_credit=0, + remaining_credit=Decimal('0'), source_modified_date='2022-10-23T00:00:00.000Z', status=shared.BillCreditNoteStatus.PAID, - sub_total=805.78, + sub_total=Decimal('805.78'), supplemental_data=shared.SupplementalData( content={ - "nesciunt": { - "eum": 'vel', - "voluptatum": 'magnam', - "exercitationem": 'ab', - }, - "porro": { - "nobis": 'laboriosam', - "recusandae": 'consequuntur', + "facilis": { + "cum": 'commodi', }, }, ), supplier_ref=shared.SupplierRef( - id='05e16dea-b3fe-4c95-b8a6-4584273a8418', - supplier_name='fugiat', + id='75fd5e60-b375-4ed4-b6fb-ee41f33317fe', + supplier_name='consectetur', ), - total_amount=805.78, - total_discount=0, - total_tax_amount=0, + total_amount=Decimal('805.78'), + total_discount=Decimal('0'), + total_tax_amount=Decimal('0'), withholding_tax=[ shared.WithholdingTaxitems( - amount=3955.44, - name='Edith Beahan', + amount=Decimal('3581.07'), + name='Rick Beer', ), ], ), - bill_credit_note_id='soluta', + bill_credit_note_id='vitae', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - timeout_in_minutes=3860, + timeout_in_minutes=881721, ) res = s.bill_credit_notes.update(req) @@ -589,3 +480,61 @@ if res.update_bill_credit_note_response is not None: **[operations.UpdateBillCreditNoteResponse](../../models/operations/updatebillcreditnoteresponse.md)** + +## upload_attachment + +--- +stoplight-id: c26f5b1b19168 +--- + +The *Upload bill credit note attachment* endpoint uploads an attachment and assigns it against a specific `billCreditNoteId`. + +[Bill Credit Notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + +**Integration-specific behaviour** + +For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support uploading a bill credit note attachment. + + +### Example Usage + +```python +import codataccounting +from codataccounting.models import operations, shared + +s = codataccounting.CodatAccounting( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = operations.UploadBillCreditNoteAttachmentRequest( + request_body=operations.UploadBillCreditNoteAttachmentRequestBody( + content='similique'.encode(), + request_body='tempora', + ), + bill_credit_note_id='aspernatur', + company_id='8a210b68-6988-11ed-a1eb-0242ac120002', + connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', +) + +res = s.bill_credit_notes.upload_attachment(req) + +if res.status_code == 200: + # handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `request` | [operations.UploadBillCreditNoteAttachmentRequest](../../models/operations/uploadbillcreditnoteattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + + +### Response + +**[operations.UploadBillCreditNoteAttachmentResponse](../../models/operations/uploadbillcreditnoteattachmentresponse.md)** + diff --git a/previous-versions/accounting/docs/sdks/billpayments/README.md b/previous-versions/accounting/docs/sdks/billpayments/README.md index dc4c7c51b..d907eaa22 100755 --- a/previous-versions/accounting/docs/sdks/billpayments/README.md +++ b/previous-versions/accounting/docs/sdks/billpayments/README.md @@ -30,6 +30,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -40,47 +41,23 @@ s = codataccounting.CodatAccounting( req = operations.CreateBillPaymentRequest( bill_payment=shared.BillPayment( account_ref=shared.AccountRef( - id='929921ae-fb9f-458c-8d86-e68e4be05601', - name='Shawna Hamill', + id='6555ba3c-2874-44ed-93b8-8f3a8d8f5c0b', + name='Faith Cole', ), currency='USD', - currency_rate=4585.03, + currency_rate=Decimal('7090.72'), date_='2022-10-23T00:00:00.000Z', id='3d5a8e00-d108-4045-8823-7f342676cffa', lines=[ shared.BillPaymentLine( allocated_on_date='2022-10-23T00:00:00.000Z', - amount=3361.02, + amount=Decimal('2927.94'), links=[ shared.BillPaymentLineLink( - amount=8806.79, - currency_rate=7746.84, - id='fef66ef1-caa3-4383-82be-b477373c8d72', - type=shared.BillPaymentLineLinkType.DISCOUNT, - ), - shared.BillPaymentLineLink( - amount=4269.04, - currency_rate=3008.24, - id='d1db1f2c-4310-4661-a963-49e1cf9e06e3', - type=shared.BillPaymentLineLinkType.PAYMENT_ON_ACCOUNT, - ), - shared.BillPaymentLineLink( - amount=2503.98, - currency_rate=2244.67, - id='7000ae6b-6bc9-4b8f-b59e-ac55a9741d31', - type=shared.BillPaymentLineLinkType.UNKNOWN, - ), - ], - ), - shared.BillPaymentLine( - allocated_on_date='2022-10-23T00:00:00.000Z', - amount=3220.17, - links=[ - shared.BillPaymentLineLink( - amount=6113.28, - currency_rate=4030.26, - id='5bb8a720-2611-4435-a139-dbc2259b1abd', - type=shared.BillPaymentLineLinkType.PAYMENT_ON_ACCOUNT, + amount=Decimal('6719.07'), + currency_rate=Decimal('1523.54'), + id='76b26916-fe1f-408f-8294-e3698f447f60', + type=shared.BillPaymentLineLinkType.BILL, ), ], ), @@ -90,39 +67,25 @@ req = operations.CreateBillPaymentRequest( ), modified_date='2022-10-23T00:00:00.000Z', note='Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44', - payment_method_ref=shared.PaymentMethodRef( - id='c070e108-4cb0-4672-91ad-879eeb9665b8', - name='Cecelia Wiza', - ), - reference='alias', + payment_method_ref='praesentium', + reference='facilis', source_modified_date='2022-10-23T00:00:00.000Z', supplemental_data=shared.SupplementalData( content={ - "fuga": { - "accusantium": 'expedita', - "officiis": 'eos', - "quibusdam": 'odio', - "praesentium": 'odit', - }, - "explicabo": { - "error": 'earum', - "adipisci": 'recusandae', - }, - "similique": { - "quidem": 'quis', - "beatae": 'unde', + "incidunt": { + "ipsam": 'debitis', }, }, ), supplier_ref=shared.SupplierRef( - id='7f92443d-a7ce-452b-895c-537c6454efb0', - supplier_name='libero', + id='80ca55ef-d20e-4457-a185-8b6a89fbe3a5', + supplier_name='officia', ), - total_amount=1329.54, + total_amount=Decimal('1329.54'), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=189753, + timeout_in_minutes=676243, ) res = s.bill_payments.create(req) @@ -177,7 +140,7 @@ Integrations that support soft delete do not permanently delete the object in th ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -186,7 +149,7 @@ s = codataccounting.CodatAccounting( ) req = operations.DeleteBillPaymentRequest( - bill_payment_id='labore', + bill_payment_id='corrupti', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', ) @@ -225,7 +188,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -234,7 +197,7 @@ s = codataccounting.CodatAccounting( ) req = operations.GetBillPaymentsRequest( - bill_payment_id='totam', + bill_payment_id='accusamus', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', ) @@ -274,7 +237,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -319,7 +282,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -332,7 +295,7 @@ req = operations.ListBillPaymentsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='occaecati', + query='tempora', ) res = s.bill_payments.list(req) diff --git a/previous-versions/accounting/docs/sdks/bills/README.md b/previous-versions/accounting/docs/sdks/bills/README.md index a434159aa..33d991329 100755 --- a/previous-versions/accounting/docs/sdks/bills/README.md +++ b/previous-versions/accounting/docs/sdks/bills/README.md @@ -35,6 +35,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -44,319 +45,123 @@ s = codataccounting.CodatAccounting( req = operations.CreateBillRequest( bill=shared.Bill( - amount_due=3759.94, - currency='EUR', - currency_rate=2420.99, + amount_due=Decimal('5436.78'), + currency='GBP', + currency_rate=Decimal('2826.99'), due_date='2022-10-23T00:00:00.000Z', - id='a5acfbe2-fd57-4075-b792-9177deac646e', + id='0ab40750-88e5-4186-a065-e904f3b1194b', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.BillLineItem( account_ref=shared.AccountRef( - id='573409e3-eb1e-45a2-b12e-b07f116db995', - name='Bernice Yundt', + id='abf603a7-9f9d-4fe0-ab7d-a8a50ce187f8', + name='Ms. Alison Schoen', ), - description='enim', - discount_amount=9449.5, - discount_percentage=6573.19, + description='assumenda', + discount_amount=Decimal('4103.01'), + discount_percentage=Decimal('5391.18'), is_direct_cost=False, item_ref=shared.ItemRef( - id='88970e18-9dbb-430f-8b33-ea055b197cd4', - name='Kellie Corwin', + id='9eee9526-f8d9-486e-881e-ad4f0e101256', + name='Elsa Maggio', ), - quantity=1645.32, - sub_total=8138.8, - tax_amount=5129.05, + quantity=Decimal('1604.67'), + sub_total=Decimal('5801.07'), + tax_amount=Decimal('8863.05'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=1403.84, - id='d3513bb6-f48b-4656-bcdb-35ff2e4b2753', - name='Genevieve Lebsack', + effective_tax_rate=Decimal('5979.37'), + id='73e922a5-7a15-4be3-a060-807e2b6e3ab8', + name='Jim Hammes II', ), - total_amount=6040.78, + total_amount=Decimal('5973.03'), tracking=shared.Propertiestracking( category_refs=[ shared.TrackingCategoryRef( - id='7319c177-d525-4f77-b114-eeb52ff785fc', - name='Mrs. Claudia Leuschke', - ), - shared.TrackingCategoryRef( - id='4c98e0c2-bb89-4eb7-9dad-636c600503d8', - name='Mr. Jonathon Fay', - ), - shared.TrackingCategoryRef( - id='0f739ae9-e057-4eb8-89e2-810331f3981d', - name='Mr. Bethany Koch', - ), - shared.TrackingCategoryRef( - id='607f3c93-c73b-49da-bf2c-eda7e23f2257', - name='Virginia Bins', + id='7a60ff2a-54a3-41e9-8764-a3e865e7956f', + name='Miss Bruce Hermann', ), ], - customer_ref=shared.CustomerRef( - company_name='delectus', - id='4b7544e4-72e8-4028-97a5-b40463a7d575', - ), - is_billed_to=shared.BilledToType.PROJECT, - is_rebilled_to=shared.BilledToType.UNKNOWN, - project_ref=shared.ProjectRef( - id='400e764a-d733-44ec-9b78-1b36a08088d1', - name='Jessica Turner', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='a200ef04-22eb-4216-8cf9-ab8366c723ff', - name='Cameron Mosciski III', - ), - shared.TrackingCategoryRef( - id='bee4825c-1fc0-4e11-9c80-bff918544ec4', - name='Nadine Terry', - ), - shared.TrackingCategoryRef( - id='ce8f1977-773e-4635-a2a7-b408f05e3d48', - name='Clint Ortiz', - ), - shared.TrackingCategoryRef( - id='13a1f5fd-9425-49c0-b36f-25ea944f3b75', - name='Dr. Alexandra Bernhard', + customer_ref=shared.AccountingCustomerRef( + company_name='mollitia', + id='9da660ff-57bf-4aad-8f9e-fc1b4512c103', ), - ], - unit_amount=7869.54, - ), - shared.BillLineItem( - account_ref=shared.AccountRef( - id='37a51262-4383-45bb-805a-23a45cefc5fd', - name='Juan Abshire DDS', - ), - description='necessitatibus', - discount_amount=1559.78, - discount_percentage=1189.32, - is_direct_cost=False, - item_ref=shared.ItemRef( - id='69e51001-9c6d-4c5e-b476-2799bfbbe694', - name='Irvin Rippin', - ), - quantity=7202.66, - sub_total=2791.72, - tax_amount=9253.95, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=7972.54, - id='ae6c3d5d-b3ad-4ebd-9dae-a4c506a8aa94', - name='Thomas Conroy', - ), - total_amount=3085.28, - tracking=shared.Propertiestracking( - category_refs=[ - shared.TrackingCategoryRef( - id='f5e9d9a4-578a-4dc1-ac60-0dec001ac802', - name='Louis Treutel V', - ), - shared.TrackingCategoryRef( - id='ff8f0f81-6ff3-4477-813e-902c14125b09', - name='Carol O'Reilly', - ), - shared.TrackingCategoryRef( - id='8151a472-af92-43c5-949f-83f350cf876f', - name='Mr. Robin Miller', - ), - shared.TrackingCategoryRef( - id='6ecbb4e2-43cf-4789-bfaf-eda53e5ae6e0', - name='Myron Boyle', - ), - ], - customer_ref=shared.CustomerRef( - company_name='quisquam', - id='2b9c247c-8837-43a4-8e19-42f32e550557', - ), - is_billed_to=shared.BilledToType.NOT_APPLICABLE, + is_billed_to=shared.BilledToType.UNKNOWN, is_rebilled_to=shared.BilledToType.NOT_APPLICABLE, project_ref=shared.ProjectRef( - id='f5d56d0b-d0af-42df-a13d-b4f62cba3f89', - name='Joyce O'Connell', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='0b80a692-4d3b-42ec-bcc8-f895010f5dd3', - name='Chester Willms V', - ), - shared.TrackingCategoryRef( - id='04e54c82-f168-4a36-bc88-73e484380b1f', - name='Yvette Larson', - ), - shared.TrackingCategoryRef( - id='275a60a0-4c49-45cc-a991-71b51c1bdb1c', - name='Leroy Ratke', - ), - shared.TrackingCategoryRef( - id='8ebdfc4c-cca9-49bc-bfc0-b2dce10873e4', - name='Ms. Susie Batz', - ), - ], - unit_amount=4312.53, - ), - shared.BillLineItem( - account_ref=shared.AccountRef( - id='78878ba8-581a-4582-88c5-4fefa9c95f2e', - name='Noel Hauck', - ), - description='nemo', - discount_amount=8493.37, - discount_percentage=2012.66, - is_direct_cost=False, - item_ref=shared.ItemRef( - id='07cfee81-206e-4281-bfa4-a41c480d3f21', - name='Theresa Pfannerstill I', - ), - quantity=1018.54, - sub_total=449.29, - tax_amount=1341.73, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=8603.62, - id='514f4cc6-f18b-4f96-a1a6-a4f77a87ee3e', - name='Susie Ward', - ), - total_amount=1316.87, - tracking=shared.Propertiestracking( - category_refs=[ - shared.TrackingCategoryRef( - id='65b34418-e3bb-491c-8d97-5e0e8419d8f8', - name='Lila Bradtke', - ), - shared.TrackingCategoryRef( - id='f3e07edc-c4aa-45f3-8abd-905a972e0567', - name='Myrtle Cremin', - ), - shared.TrackingCategoryRef( - id='b2d30947-0bf7-4a4f-a87c-f535a6fae54e', - name='Miss Cary Howe', - ), - shared.TrackingCategoryRef( - id='21f023b7-5d23-467f-a1a0-cc8df79f0a39', - name='Miss Estelle Mills', - ), - ], - customer_ref=shared.CustomerRef( - company_name='commodi', - id='4b7c15df-bace-4188-b1c4-ee2c8c6ce611', - ), - is_billed_to=shared.BilledToType.PROJECT, - is_rebilled_to=shared.BilledToType.PROJECT, - project_ref=shared.ProjectRef( - id='eb1c7cbd-b6ee-4c74-b78b-a25317747dc9', - name='Annette Osinski', + id='48dc2f61-5199-4ebf-90e9-fe6c632ca3ae', + name='Ms. William Boyle', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='af5dd672-3dc0-4f5a-a2f3-a6b700878756', - name='Gail Fay', - ), - shared.TrackingCategoryRef( - id='a6c98b55-5540-480d-80bc-acc6cbd6b5f3', - name='Ms. Wilbert McGlynn', - ), - shared.TrackingCategoryRef( - id='04f926ba-d255-4381-9b47-4b0ed20e5624', - name='Moses Wuckert', - ), - shared.TrackingCategoryRef( - id='39a910ab-dcab-4626-b669-6e1ec00221b3', - name='Yvonne Stamm', + id='96312fde-0477-4177-8ff6-1d017476360a', + name='Audrey Stiedemann', ), ], - unit_amount=6294.61, + unit_amount=Decimal('6391.87'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='tempore', + note='aliquid', payment_allocations=[ shared.BillPaymentAllocation( allocation=shared.BillPaymentAllocationAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', - currency='EUR', - currency_rate=9890.89, - total_amount=8360.53, + currency='USD', + currency_rate=Decimal('3747.53'), + total_amount=Decimal('6145.28'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='a8d0c549-ef03-4004-978a-61fa1cf20688', - name='Jared Koepp DVM', + id='a1adeaab-5851-4d6c-a45b-08b61891baa0', + name='Stewart Brakus', ), currency='EUR', - currency_rate=7989.53, - id='71dca163-f2a3-4c80-a97f-f334cddf857a', - note='perspiciatis', + currency_rate=Decimal('291.9'), + id='08e6f8c5-f350-4d8c-9b5a-341814301042', + note='ab', paid_on_date='2022-10-23T00:00:00.000Z', - reference='eum', - total_amount=951.23, + reference='quae', + total_amount=Decimal('2226.58'), ), ), ], purchase_order_refs=[ shared.PurchaseOrderRef( - id='76c6ab21-d29d-4fc9-8d6f-ecd799390066', - purchase_order_number='laborum', - ), - shared.PurchaseOrderRef( - id='6d2d0003-5533-48ce-8086-fa21e9152cb3', - purchase_order_number='beatae', - ), - shared.PurchaseOrderRef( - id='19167b8e-3c8d-4b03-808d-6d364ffd4559', - purchase_order_number='alias', + id='d5208ece-7e25-43b6-a845-1c6c6e205e16', + purchase_order_number='at', ), ], - reference='ex', + reference='vero', source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.BillStatus.UNKNOWN, - sub_total=1548.4, + status=shared.BillStatus.VOID, + sub_total=Decimal('1927.18'), supplemental_data=shared.BillSupplementalData( content={ - "neque": { - "numquam": 'rem', - "officiis": 'omnis', - "neque": 'corporis', - "quod": 'dolores', - }, - "placeat": { - "recusandae": 'quos', - "dicta": 'sapiente', - "ipsum": 'consequatur', + "doloribus": { + "repudiandae": 'optio', }, }, ), supplier_ref=shared.SupplierRef( - id='be3e4320-2d72-4165-b650-6641870d9d21', - supplier_name='voluptatibus', + id='9578a645-8427-43a8-818d-162309fb0929', + supplier_name='iste', ), - tax_amount=6012.28, - total_amount=6456.09, + tax_amount=Decimal('1700.99'), + total_amount=Decimal('813.69'), withholding_tax=[ shared.BillWithholdingTax( - amount=79.19, - name='Sharon Ruecker', - ), - shared.BillWithholdingTax( - amount=7639.37, - name='Carl Breitenberg V', - ), - shared.BillWithholdingTax( - amount=1917.24, - name='Anita Dare III', - ), - shared.BillWithholdingTax( - amount=5123.7, - name='Mr. Armando Hermann', + amount=Decimal('6863.62'), + name='Jan Reichel', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=312690, + timeout_in_minutes=328379, ) res = s.bills.create(req) @@ -413,7 +218,7 @@ Integrations that support soft delete do not permanently delete the object in th ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -422,7 +227,7 @@ s = codataccounting.CodatAccounting( ) req = operations.DeleteBillRequest( - bill_id='9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2', + bill_id='7110701885', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', ) @@ -459,7 +264,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -508,7 +313,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -553,7 +358,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -604,7 +409,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -649,7 +454,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -662,7 +467,7 @@ req = operations.ListBillsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='esse', + query='quos', ) res = s.bills.list(req) @@ -697,7 +502,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -706,7 +511,7 @@ s = codataccounting.CodatAccounting( ) req = operations.ListBillAttachmentsRequest( - bill_id='13d946f0-c5d5-42bc-b092-97ece17923ab', + bill_id='9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', ) @@ -748,6 +553,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -757,203 +563,125 @@ s = codataccounting.CodatAccounting( req = operations.UpdateBillRequest( bill=shared.Bill( - amount_due=6975.91, - currency='EUR', - currency_rate=5062.45, + amount_due=Decimal('9308.19'), + currency='USD', + currency_rate=Decimal('5207.61'), due_date='2022-10-23T00:00:00.000Z', - id='5e320a31-9f4b-4adf-947c-9a867bc42426', + id='4be05601-3f59-4da7-97a5-9ecfef66ef1c', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.BillLineItem( account_ref=shared.AccountRef( - id='5816ddca-8ef5-41fc-b4c5-93ec12cdaad0', - name='Clark Kohler', + id='a3383c2b-eb47-4737-bc8d-72f64d1db1f2', + name='Mr. Jim Franecki', ), - description='saepe', - discount_amount=8139.75, - discount_percentage=7487.23, + description='ea', + discount_amount=Decimal('1076.17'), + discount_percentage=Decimal('8777.51'), is_direct_cost=False, item_ref=shared.ItemRef( - id='d80df448-a47f-4939-8c58-880983dabf9e', - name='Jeffery Williamson', + id='96349e1c-f9e0-46e3-a437-000ae6b6bc9b', + name='Tommie Klocko', ), - quantity=8301.49, - sub_total=6077.42, - tax_amount=9666.52, + quantity=Decimal('8975.43'), + sub_total=Decimal('6540.82'), + tax_amount=Decimal('7699.67'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=4877.65, - id='f079af4d-3572-44cd-b0f4-d281187d5684', - name='Eloise Stoltenberg', + effective_tax_rate=Decimal('3730.4'), + id='5a9741d3-1135-4296-9bb8-a7202611435e', + name='Tracy Mills', ), - total_amount=5057.99, + total_amount=Decimal('8028.94'), tracking=shared.Propertiestracking( category_refs=[ shared.TrackingCategoryRef( - id='a9065e62-8bdf-4c20-b2b6-c879923b7e13', - name='Leah Graham', - ), - shared.TrackingCategoryRef( - id='ae12c689-1f82-4ce1-9571-72305377dcfa', - name='Terrance Strosin', + id='2259b1ab-da8c-4070-a108-4cb0672d1ad8', + name='Daisy Tillman', ), ], - customer_ref=shared.CustomerRef( - company_name='quam', - id='5e356686-092e-49c3-9dc5-f111dea1026d', + customer_ref=shared.AccountingCustomerRef( + company_name='sint', + id='665b85ef-bd02-4bae-8be2-d782259e3ea4', ), - is_billed_to=shared.BilledToType.NOT_APPLICABLE, + is_billed_to=shared.BilledToType.CUSTOMER, is_rebilled_to=shared.BilledToType.NOT_APPLICABLE, project_ref=shared.ProjectRef( - id='1a4d190f-eb21-4780-bccc-0dbbddb48470', - name='Dominick Purdy', + id='197f9244-3da7-4ce5-ab89-5c537c6454ef', + name='Jason Rempel', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='91e6bc15-8c4c-44e5-8599-ea342260e9b2', - name='Elizabeth Rutherford', + id='896c3ca5-acfb-4e2f-9570-7577929177de', + name='Benny Jacobs', ), ], - unit_amount=5371.4, - ), - shared.BillLineItem( - account_ref=shared.AccountRef( - id='a1bd8fb7-a0a1-416c-a723-d4097fa30e9a', - name='Kurt Cronin', - ), - description='quia', - discount_amount=6090.94, - discount_percentage=1206.46, - is_direct_cost=False, - item_ref=shared.ItemRef( - id='22030d83-f5ae-4b77-99d2-2e8c1f849382', - name='Marta Stanton', - ), - quantity=1663.24, - sub_total=7639.28, - tax_amount=5526.87, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=4484.82, - id='6c2c2dfb-4cfc-41c7-a230-f841fb1bd23f', - name='Alton Bernhard', - ), - total_amount=7092.34, - tracking=shared.Propertiestracking( - category_refs=[ - shared.TrackingCategoryRef( - id='be5a6859-98e2-42ae-a0da-16fc2b271a28', - name='Clark Hermiston', - ), - shared.TrackingCategoryRef( - id='854e9043-9d22-4246-9694-62407084f7ab', - name='Nellie Ruecker', - ), - ], - customer_ref=shared.CustomerRef( - company_name='accusantium', - id='2225194d-b554-410a-9c66-9af90a26c7cd', - ), - is_billed_to=shared.BilledToType.PROJECT, - is_rebilled_to=shared.BilledToType.CUSTOMER, - project_ref=shared.ProjectRef( - id='81f06898-1d6b-4b33-8faa-348c31bf407e', - name='Francis Yundt', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='c42b78f1-5626-4398-a0dc-766324ccb06c', - name='Mr. Benny O'Reilly', - ), - ], - unit_amount=271.97, + unit_amount=Decimal('8886.16'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='enim', + note='quidem', payment_allocations=[ shared.BillPaymentAllocation( allocation=shared.BillPaymentAllocationAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', - currency='GBP', - currency_rate=4866.06, - total_amount=27.58, + currency='USD', + currency_rate=Decimal('2114.55'), + total_amount=Decimal('2646.19'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='b8d5722d-d895-4b8b-8f24-db959693352f', - name='Joanne Hermiston', + id='09e3eb1e-5a2b-412e-b07f-116db99545fc', + name='Ronnie Welch', ), currency='USD', - currency_rate=5812.69, - id='4d78de3b-6e93-489f-9abb-7f662550a283', - note='totam', + currency_rate=Decimal('5646.67'), + id='70e189db-b30f-4cb3-bea0-55b197cd44e2', + note='asperiores', paid_on_date='2022-10-23T00:00:00.000Z', - reference='deserunt', - total_amount=7547.84, + reference='consequuntur', + total_amount=Decimal('8138.8'), ), ), ], purchase_order_refs=[ shared.PurchaseOrderRef( - id='83afd231-5bba-4650-964e-06f5bf6ae591', - purchase_order_number='expedita', - ), - shared.PurchaseOrderRef( - id='c8bdef36-12b6-43c2-85fd-a840774a68a9', - purchase_order_number='laborum', + id='82d3513b-b6f4-48b6-96bc-db35ff2e4b27', + purchase_order_number='nostrum', ), ], - reference='dolor', + reference='neque', source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.BillStatus.DRAFT, - sub_total=229.66, + status=shared.BillStatus.PAID, + sub_total=Decimal('5221.76'), supplemental_data=shared.BillSupplementalData( content={ - "voluptas": { - "voluptas": 'maiores', - "ea": 'vel', - "delectus": 'accusamus', - }, - "reiciendis": { - "sed": 'accusantium', - }, - "voluptates": { - "maiores": 'quaerat', - "numquam": 'non', - "cum": 'incidunt', + "eligendi": { + "fugiat": 'unde', }, }, ), supplier_ref=shared.SupplierRef( - id='257b992c-8dbd-4a6a-a1ef-a2198258fd0a', - supplier_name='iste', + id='e7319c17-7d52-45f7-bb11-4eeb52ff785f', + supplier_name='quisquam', ), - tax_amount=9085.87, - total_amount=7236.23, + tax_amount=Decimal('1972.59'), + total_amount=Decimal('4671.19'), withholding_tax=[ shared.BillWithholdingTax( - amount=2889.07, - name='Shari Konopelski', - ), - shared.BillWithholdingTax( - amount=9156.53, - name='Thomas Hahn', - ), - shared.BillWithholdingTax( - amount=2946.5, - name='Desiree Howell IV', + amount=Decimal('5349.08'), + name='Jamie Simonis', ), ], ), - bill_id='13d946f0-c5d5-42bc-b092-97ece17923ab', + bill_id='7110701885', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - timeout_in_minutes=114588, + timeout_in_minutes=514993, ) res = s.bills.update(req) @@ -992,7 +720,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -1002,10 +730,10 @@ s = codataccounting.CodatAccounting( req = operations.UploadBillAttachmentRequest( request_body=operations.UploadBillAttachmentRequestBody( - content='quisquam'.encode(), - request_body='atque', + content='repudiandae'.encode(), + request_body='consequatur', ), - bill_id='9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2', + bill_id='EILBDVJVNUAGVKRQ', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', ) diff --git a/previous-versions/accounting/docs/sdks/codataccounting/README.md b/previous-versions/accounting/docs/sdks/codataccounting/README.md index d591531a3..1d08231d6 100755 --- a/previous-versions/accounting/docs/sdks/codataccounting/README.md +++ b/previous-versions/accounting/docs/sdks/codataccounting/README.md @@ -8,7 +8,7 @@ Standardize how you connect to your customers’ accounting software. View, crea [Read more...](https://docs.codat.io/accounting-api/overview) -[See our OpenAPI spec](https://github.com/codatio/oas) +[See our OpenAPI spec](https://github.com/codatio/oas) ### Available Operations diff --git a/previous-versions/accounting/docs/sdks/companyinfo/README.md b/previous-versions/accounting/docs/sdks/companyinfo/README.md index 8c44cb4d4..08dbea82a 100755 --- a/previous-versions/accounting/docs/sdks/companyinfo/README.md +++ b/previous-versions/accounting/docs/sdks/companyinfo/README.md @@ -17,7 +17,7 @@ Gets the latest basic info for a company. ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -56,7 +56,7 @@ Initiates the process of synchronising basic info for a company ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( diff --git a/previous-versions/accounting/docs/sdks/creditnotes/README.md b/previous-versions/accounting/docs/sdks/creditnotes/README.md index ad56f3a39..3c46d44b4 100755 --- a/previous-versions/accounting/docs/sdks/creditnotes/README.md +++ b/previous-versions/accounting/docs/sdks/creditnotes/README.md @@ -30,6 +30,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -39,203 +40,125 @@ s = codataccounting.CodatAccounting( req = operations.CreateCreditNoteRequest( credit_note=shared.CreditNote( - additional_tax_amount=6319.04, - additional_tax_percentage=8377.39, + additional_tax_amount=Decimal('1363.57'), + additional_tax_percentage=Decimal('7239.42'), allocated_on_date='2022-10-23T00:00:00.000Z', - credit_note_number='ad', + credit_note_number='quas', currency='USD', - currency_rate=3831.96, - customer_ref=shared.CustomerRef( - company_name='reiciendis', - id='df1ad837-ae80-4c1c-99c9-5ba998678fa3', + currency_rate=Decimal('9222.99'), + customer_ref=shared.AccountingCustomerRef( + company_name='rerum', + id='75dad636-c600-4503-98bb-31180f739ae9', ), - discount_percentage=9409.51, - id='696991af-388c-4e03-a144-48c7977a0ef2', + discount_percentage=Decimal('9202.72'), + id='057eb809-e281-4033-9f39-81d4c700b607', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.CreditNoteLineItem( account_ref=shared.AccountRef( - id='36028efe-ef93-4415-aed7-e253f4c157de', - name='Ms. Ernesto King DVM', + id='3c93c73b-9da3-4f2c-ada7-e23f2257411f', + name='Toby Friesen', ), - description='incidunt', - discount_amount=2930.23, - discount_percentage=3626.93, + description='exercitationem', + discount_amount=Decimal('2883'), + discount_percentage=Decimal('2543.82'), is_direct_income=False, item_ref=shared.ItemRef( - id='accf667a-af9b-4bad-985f-e431d6bf5c83', - name='Emilio Ratke', + id='e472e802-857a-45b4-8463-a7d575f1400e', + name='Gertrude Gerhold', ), - quantity=7992.36, - sub_total=1330.76, - tax_amount=538.69, + quantity=Decimal('4523.99'), + sub_total=Decimal('2327.72'), + tax_amount=Decimal('2006.37'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=7734.55, - id='b67fc4b4-25e9-49e6-a34c-9f7b79dfeb77', - name='Tommy Schmidt', + effective_tax_rate=Decimal('3106.29'), + id='ec1b781b-36a0-4808-8d10-0efada200ef0', + name='Phyllis Denesik', ), - total_amount=8736.81, + total_amount=Decimal('1267.27'), tracking=shared.CreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='baf91e50-6ef8-490a-94b4-75f16f56d385', - name='Earl Schoen', - ), - shared.TrackingCategoryRef( - id='c631b99e-26ce-4d8f-9fdb-9410f63bbf81', - name='Kay Frami', + id='164cf9ab-8366-4c72-bffd-a9e06bee4825', + name='Willie Wiza PhD', ), ], - customer_ref=shared.CustomerRef( - company_name='aperiam', - id='1afdd788-6241-489e-b448-73f5033f19db', + customer_ref=shared.AccountingCustomerRef( + company_name='architecto', + id='15c80bff-9185-444e-842d-efcce8f19777', ), - is_billed_to=shared.BilledToType1.PROJECT, + is_billed_to=shared.BilledToType1.NOT_APPLICABLE, is_rebilled_to=shared.BilledToType1.UNKNOWN, project_ref=shared.ProjectRef( - id='25ce4152-eab9-4cd7-a522-4a6a0e123b78', - name='Tamara Terry', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='e1f67f3c-4cce-44b6-9769-6ff3c5747501', - name='Stacy Kovacek', + id='e63562a7-b408-4f05-a3d4-8fdaf313a1f5', + name='Woodrow Mitchell III', ), - shared.TrackingCategoryRef( - id='4f51f8b0-84c3-4197-a193-a245467f9487', - name='Rachael Corkery', - ), - shared.TrackingCategoryRef( - id='cc497223-3e66-4bd8-be5d-00b979ef2038', - name='Mrs. Gladys Collins', - ), - ], - unit_amount=155.63, - ), - shared.CreditNoteLineItem( - account_ref=shared.AccountRef( - id='ccc10964-0031-43b3-a504-4f65fe72dc40', - name='Miss Constance Shanahan', - ), - description='adipisci', - discount_amount=9504.86, - discount_percentage=2527.17, - is_direct_income=False, - item_ref=shared.ItemRef( - id='08efc15c-eb4d-46e1-aae0-f75aedf2acab', - name='Tracey Rodriguez', - ), - quantity=912.7, - sub_total=7863.19, - tax_amount=6004.71, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=1535.13, - id='6ddb5894-61e7-4421-8be6-d9502f0ea930', - name='Hector Mayer', - ), - total_amount=6813.31, - tracking=shared.CreditNoteLineItemTracking( - category_refs=[ - shared.TrackingCategoryRef( - id='2f72f885-0090-4491-9608-207888ec6618', - name='Latoya West', - ), - shared.TrackingCategoryRef( - id='659eb40e-c16f-4af7-9b0b-532a4da37cba', - name='Tommie Gutkowski', - ), - shared.TrackingCategoryRef( - id='2c4842c9-b2ad-432d-afe8-1a88f4444573', - name='Alonzo Schmidt', - ), - shared.TrackingCategoryRef( - id='7353f63c-8209-4379-aa69-cd5fbcf79da1', - name='Blake Kuhic', - ), - ], - customer_ref=shared.CustomerRef( - company_name='eos', - id='bf95894e-6861-4adb-95f9-e5d751c9fe8f', - ), - is_billed_to=shared.BilledToType1.NOT_APPLICABLE, - is_rebilled_to=shared.BilledToType1.NOT_APPLICABLE, - project_ref=shared.ProjectRef( - id='02bfdc34-5084-41f1-b644-56379f3fb27e', - name='Stephanie Yundt', + record_ref=shared.InvoiceTo( + data_type='accountTransaction', + id='c0b36f25-ea94-44f3-b756-c11f6c37a512', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='657b36fc-6b9f-4587-8e52-5c67641a8312', - name='Jerome Berge', + id='6243835b-bc05-4a23-a45c-efc5fde10a0c', + name='Randy Carter', ), ], - unit_amount=7303.7, + unit_amount=Decimal('8927.08'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='cumque', + note='architecto', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', - currency='EUR', - currency_rate=7678.8, - total_amount=7149.33, + currency='GBP', + currency_rate=Decimal('828.76'), + total_amount=Decimal('5905.85'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='423abcdc-91fa-4abd-988e-71f6c48252d7', - name='Delores Bosco', + id='c6dc5e34-7627-499b-bbbe-6949fb2bb4ec', + name='Bert Kassulke', ), currency='EUR', - currency_rate=8719.69, - id='074009ef-8d29-4de1-9d70-97b5da08c57f', - note='id', + currency_rate=Decimal('3674.75'), + id='db3adebd-5dae-4a4c-906a-8aa94c02644c', + note='hic', paid_on_date='2022-10-23T00:00:00.000Z', - reference='cumque', - total_amount=4846.96, + reference='officiis', + total_amount=Decimal('6036.5'), ), ), ], - remaining_credit=5395.02, + remaining_credit=Decimal('8603.11'), source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.CreditNoteStatus.UNKNOWN, - sub_total=991.6, + status=shared.CreditNoteStatus.PAID, + sub_total=Decimal('2986.13'), supplemental_data=shared.SupplementalData( content={ - "accusamus": { - "excepturi": 'harum', - }, - "laborum": { - "repudiandae": 'minus', - "officia": 'laboriosam', - "illo": 'cupiditate', - "veritatis": 'aliquam', + "nostrum": { + "esse": 'corrupti', }, }, ), - total_amount=5682.31, - total_discount=5410.46, - total_tax_amount=1166.65, + total_amount=Decimal('6847.99'), + total_discount=Decimal('8152.25'), + total_tax_amount=Decimal('7736.59'), withholding_tax=[ shared.WithholdingTaxitems( - amount=428.84, - name='Sam Gerlach', - ), - shared.WithholdingTaxitems( - amount=5497.1, - name='Erick Bernhard DVM', + amount=Decimal('986.1'), + name='Mr. Forrest Howe', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=997047, + timeout_in_minutes=901008, ) res = s.credit_notes.create(req) @@ -272,7 +195,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -282,7 +205,7 @@ s = codataccounting.CodatAccounting( req = operations.GetCreditNoteRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - credit_note_id='voluptatem', + credit_note_id='maxime', ) res = s.credit_notes.get(req) @@ -321,7 +244,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -366,7 +289,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -379,7 +302,7 @@ req = operations.ListCreditNotesRequest( order_by='-modifiedDate', page=1, page_size=100, - query='dolor', + query='consequatur', ) res = s.credit_notes.list(req) @@ -419,6 +342,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -428,257 +352,119 @@ s = codataccounting.CodatAccounting( req = operations.UpdateCreditNoteRequest( credit_note=shared.CreditNote( - additional_tax_amount=7194.5, - additional_tax_percentage=3125.63, + additional_tax_amount=Decimal('510.07'), + additional_tax_percentage=Decimal('1023.9'), allocated_on_date='2022-10-23T00:00:00.000Z', - credit_note_number='neque', + credit_note_number='porro', currency='USD', - currency_rate=9281.02, - customer_ref=shared.CustomerRef( - company_name='numquam', - id='aa868555-9667-432a-a5dc-b6682cb70f8c', + currency_rate=Decimal('608.92'), + customer_ref=shared.AccountingCustomerRef( + company_name='magni', + id='e2ec09ff-8f0f-4816-bf34-77c13e902c14', ), - discount_percentage=9497.96, - id='d5fb6e91-b9a9-4f74-846e-2c3309db0536', + discount_percentage=Decimal('1165.58'), + id='25b0960a-6681-451a-872a-f923c5949f83', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.CreditNoteLineItem( account_ref=shared.AccountRef( - id='e75ca006-f539-42c1-9a25-a8bf92f97428', - name='Al Mills', - ), - description='hic', - discount_amount=5458.54, - discount_percentage=7433.13, - is_direct_income=False, - item_ref=shared.ItemRef( - id='f8221125-359d-4983-87f7-a79cd72cd248', - name='Krystal Pagac IV', - ), - quantity=1794.33, - sub_total=6090.79, - tax_amount=9701.08, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=1847.74, - id='ac41ef57-25f1-4169-ac1e-41d8a23c23e3', - name='Kristie Daugherty', - ), - total_amount=6505.38, - tracking=shared.CreditNoteLineItemTracking( - category_refs=[ - shared.TrackingCategoryRef( - id='a197f6de-9221-451f-a171-2099853e9f54', - name='Meredith Langosh', - ), - shared.TrackingCategoryRef( - id='439ee224-4604-443b-8154-188c2f56e85d', - name='Jessie Larkin', - ), - ], - customer_ref=shared.CustomerRef( - company_name='officiis', - id='abd617c3-b0d5-41a4-8bf0-1bad8706d460', - ), - is_billed_to=shared.BilledToType1.NOT_APPLICABLE, - is_rebilled_to=shared.BilledToType1.UNKNOWN, - project_ref=shared.ProjectRef( - id='bfbdc41f-f5d4-4e2a-a4fb-5cb35d17638f', - name='Delia Schuppe', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='359ecc5c-b860-4f8c-9580-ba73810e4fe4', - name='Megan Kling', - ), - shared.TrackingCategoryRef( - id='7cd3b1dd-3bbc-4e24-bb76-84eff50126d7', - name='Vicky Wolf', - ), - shared.TrackingCategoryRef( - id='d0eb74b8-4219-453b-84bd-3c43159d33e5', - name='Gordon Ernser Jr.', - ), - ], - unit_amount=1167.42, - ), - shared.CreditNoteLineItem( - account_ref=shared.AccountRef( - id='139863aa-41e6-4c31-8c2f-1fcb51c9a41f', - name='Rudy Waters', + id='350cf876-ffb9-401c-aecb-b4e243cf789f', + name='Lynn Wuckert', ), - description='quidem', - discount_amount=8383.74, - discount_percentage=4379.79, + description='deserunt', + discount_amount=Decimal('3590.97'), + discount_percentage=Decimal('2465.77'), is_direct_income=False, item_ref=shared.ItemRef( - id='95ee65e0-76cc-47ab-b616-ea5c71641934', - name='Tracy Bahringer', + id='e5ae6e0a-c184-4c2b-9c24-7c88373a40e1', + name='Micheal Cassin', ), - quantity=8851.03, - sub_total=252.1, - tax_amount=5776.72, + quantity=Decimal('1397.45'), + sub_total=Decimal('9368.45'), + tax_amount=Decimal('3305.96'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=8573.88, - id='19d2fc2f-9e2e-4105-944b-935d237a72f9', - name='Mattie Gutkowski', + effective_tax_rate=Decimal('3731.06'), + id='055756f5-d56d-40bd-8af2-dfe13db4f62c', + name='Lorenzo Flatley', ), - total_amount=3849.39, + total_amount=Decimal('6211.4'), tracking=shared.CreditNoteLineItemTracking( category_refs=[ shared.TrackingCategoryRef( - id='ed4aecb7-537c-4d92-a2c9-ff57491aabfa', - name='Eula Kuhic DVM', - ), - shared.TrackingCategoryRef( - id='0ca4d456-ef10-431e-a899-f0c2001e22cd', - name='June Schmeler III', - ), - shared.TrackingCategoryRef( - id='84a184d7-6d97-41fc-820c-65b037bb8e0c', - name='Byron MacGyver V', + id='41aebc0b-80a6-4924-93b2-ecfcc8f89501', + name='Melba Heaney', ), ], - customer_ref=shared.CustomerRef( - company_name='molestiae', - id='e4de04af-28c5-4ddd-b46a-a1cfd6d828da', + customer_ref=shared.AccountingCustomerRef( + company_name='neque', + id='d6fa1804-e54c-482f-968a-363c8873e484', ), is_billed_to=shared.BilledToType1.UNKNOWN, - is_rebilled_to=shared.BilledToType1.UNKNOWN, + is_rebilled_to=shared.BilledToType1.NOT_APPLICABLE, project_ref=shared.ProjectRef( - id='31911296-4664-45c1-981f-29042f569b7a', - name='Randal Altenwerth', + id='0b1f6b8c-a275-4a60-a04c-495cc699171b', + name='Miss Joyce Runolfsson', ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='216cbe07-1bc1-463e-a79a-3b084da99257', - name='Gary Gorczany', - ), - ], - unit_amount=572.07, - ), - shared.CreditNoteLineItem( - account_ref=shared.AccountRef( - id='847a742d-8449-46cb-9eec-f6b99bc63562', - name='Jonathon Zboncak', - ), - description='enim', - discount_amount=3686.58, - discount_percentage=7835.08, - is_direct_income=False, - item_ref=shared.ItemRef( - id='294c060b-06a1-4287-b64e-ef6d0c6d6ed9', - name='Arnold Dooley', - ), - quantity=4337.98, - sub_total=2479.27, - tax_amount=2855.44, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=3419.34, - id='71509a8e-870d-43c5-a1f9-c242c7b66a1f', - name='Michelle Schmeler', - ), - total_amount=8150.46, - tracking=shared.CreditNoteLineItemTracking( - category_refs=[ - shared.TrackingCategoryRef( - id='5b671989-0f42-4a4b-b438-d85b260591d7', - name='Geraldine Von', - ), - shared.TrackingCategoryRef( - id='2059c9c3-f567-4e0e-a527-65b1d62fcdac', - name='Mr. Joe Wisozk', - ), - shared.TrackingCategoryRef( - id='16ce2239-e8f2-45cd-8d19-d959f439e392', - name='Gertrude Runte', - ), - shared.TrackingCategoryRef( - id='95f7aa2b-2411-4369-9d1e-6698fcc45962', - name='Minnie Schneider', - ), - ], - customer_ref=shared.CustomerRef( - company_name='quam', - id='76763342-5403-48bf-b597-1e9819055738', - ), - is_billed_to=shared.BilledToType1.NOT_APPLICABLE, - is_rebilled_to=shared.BilledToType1.PROJECT, - project_ref=shared.ProjectRef( - id='edbac7fd-a395-494d-a6bc-2ae480632b99', - name='Hazel Renner', + record_ref=shared.InvoiceTo( + data_type='accountTransaction', + id='1cf4b888-ebdf-4c4c-8ca9-9bc7fc0b2dce', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='22063698-2855-43cb-9000-6bef4921ec20', - name='Robin Rempel', - ), - shared.TrackingCategoryRef( - id='9366ac8e-e0f2-4bf1-9588-d40d03f3deba', - name='Faye Kreiger', - ), - shared.TrackingCategoryRef( - id='3e90bc40-df86-48fd-9240-5cb331d492f4', - name='Douglas Denesik', + id='10873e42-b006-4d67-8878-ba8581a58208', + name='Lloyd Grant', ), ], - unit_amount=6941.48, + unit_amount=Decimal('9657.35'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='saepe', + note='natus', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', - currency='EUR', - currency_rate=1087.18, - total_amount=9623.97, + currency='USD', + currency_rate=Decimal('3125.11'), + total_amount=Decimal('9853.79'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='8217978d-0acc-4a77-aeb7-b7021a52046b', - name='Michele Waelchi', + id='2eac5565-d307-4cfe-a812-06e2813fa4a4', + name='Leticia Gerlach PhD', ), - currency='EUR', - currency_rate=7063.51, - id='0e67e094-fdfe-4d55-80ef-53a34a1b8fe9', - note='natus', + currency='GBP', + currency_rate=Decimal('9998.54'), + id='2132af03-102d-4514-b4cc-6f18bf9621a6', + note='animi', paid_on_date='2022-10-23T00:00:00.000Z', - reference='dolorem', - total_amount=1243.81, + reference='tenetur', + total_amount=Decimal('4934.07'), ), ), ], - remaining_credit=6824.3, + remaining_credit=Decimal('4578.35'), source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.CreditNoteStatus.VOID, - sub_total=442.64, + status=shared.CreditNoteStatus.PAID, + sub_total=Decimal('4610.5'), supplemental_data=shared.SupplementalData( content={ - "fugiat": { - "quis": 'fuga', - "eveniet": 'consequuntur', - "illum": 'delectus', - }, - "rerum": { - "perferendis": 'maiores', - "harum": 'ratione', + "eveniet": { + "earum": 'velit', }, }, ), - total_amount=5618.25, - total_discount=4837.74, - total_tax_amount=2521.83, + total_amount=Decimal('8847.65'), + total_discount=Decimal('2633.46'), + total_tax_amount=Decimal('7019.78'), withholding_tax=[ shared.WithholdingTaxitems( - amount=5768.7, - name='Desiree Ferry', + amount=Decimal('9301.11'), + name='Brittany Cole', ), ], ), @@ -686,7 +472,7 @@ req = operations.UpdateCreditNoteRequest( connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', credit_note_id='quis', force_update=False, - timeout_in_minutes=431131, + timeout_in_minutes=704402, ) res = s.credit_notes.update(req) diff --git a/previous-versions/accounting/docs/sdks/customers/README.md b/previous-versions/accounting/docs/sdks/customers/README.md index 1c66ec23c..402fc7edc 100755 --- a/previous-versions/accounting/docs/sdks/customers/README.md +++ b/previous-versions/accounting/docs/sdks/customers/README.md @@ -44,158 +44,63 @@ req = operations.CreateCustomerRequest( customer=shared.Customer( addresses=[ shared.Addressesitems( - city='San Antonio', - country='New Zealand', - line1='architecto', - line2='iure', - postal_code='95623-0684', - region='nisi', - type=shared.AddressType.DELIVERY, + city='West Elroy', + country='Bolivia', + line1='praesentium', + line2='eveniet', + postal_code='77607', + region='quos', + type=shared.AccountingAddressType.DELIVERY, ), ], - contact_name='officiis', + contact_name='sint', contacts=[ shared.Contact( address=shared.Addressesitems( - city='Hilllton', - country='Mauritius', - line1='impedit', - line2='modi', - postal_code='61968-2330', - region='odit', - type=shared.AddressType.DELIVERY, + city='Emersonside', + country='Armenia', + line1='voluptates', + line2='laudantium', + postal_code='06859', + region='deleniti', + type=shared.AccountingAddressType.UNKNOWN, ), - email='Gina93@gmail.com', + email='Barrett98@hotmail.com', modified_date='2022-10-23T00:00:00.000Z', - name='Lance Cruickshank DVM', - phone=[ - shared.PhoneNumbersitems( - number='+44 25691 154789', - type=shared.PhoneNumberType.MOBILE, - ), - shared.PhoneNumbersitems( - number='(877) 492-8687', - type=shared.PhoneNumberType.MOBILE, - ), - ], - status=shared.CustomerStatus.ACTIVE, - ), - shared.Contact( - address=shared.Addressesitems( - city='Adamsboro', - country='Chile', - line1='labore', - line2='earum', - postal_code='06184', - region='voluptates', - type=shared.AddressType.DELIVERY, - ), - email='Domenick41@yahoo.com', - modified_date='2022-10-23T00:00:00.000Z', - name='Cristina Beer V', - phone=[ - shared.PhoneNumbersitems( - number='01224 658 999', - type=shared.PhoneNumberType.FAX, - ), - shared.PhoneNumbersitems( - number='01224 658 999', - type=shared.PhoneNumberType.FAX, - ), - ], - status=shared.CustomerStatus.ACTIVE, - ), - shared.Contact( - address=shared.Addressesitems( - city='Runolfssonside', - country='Uruguay', - line1='tenetur', - line2='ipsam', - postal_code='70098-3083', - region='aspernatur', - type=shared.AddressType.BILLING, - ), - email='Diana_Hammes@yahoo.com', - modified_date='2022-10-23T00:00:00.000Z', - name='Verna Lang', + name='William Koch', phone=[ shared.PhoneNumbersitems( number='01224 658 999', - type=shared.PhoneNumberType.UNKNOWN, - ), - shared.PhoneNumbersitems( - number='+44 25691 154789', - type=shared.PhoneNumberType.UNKNOWN, - ), - shared.PhoneNumbersitems( - number='(877) 492-8687', type=shared.PhoneNumberType.FAX, ), ], - status=shared.CustomerStatus.ARCHIVED, - ), - shared.Contact( - address=shared.Addressesitems( - city='Reychester', - country='French Guiana', - line1='veritatis', - line2='fugit', - postal_code='88364', - region='hic', - type=shared.AddressType.DELIVERY, - ), - email='Jaden62@gmail.com', - modified_date='2022-10-23T00:00:00.000Z', - name='Verna Sauer', - phone=[ - shared.PhoneNumbersitems( - number='(877) 492-8687', - type=shared.PhoneNumberType.LANDLINE, - ), - shared.PhoneNumbersitems( - number='01224 658 999', - type=shared.PhoneNumberType.UNKNOWN, - ), - shared.PhoneNumbersitems( - number='01224 658 999', - type=shared.PhoneNumberType.FAX, - ), - ], - status=shared.CustomerStatus.ACTIVE, + status=shared.CustomerStatus.UNKNOWN, ), ], - customer_name='incidunt', - default_currency='EUR', - email_address='nihil', - id='7b4848bd-6a6f-4044-9d2c-3b808094373e', + customer_name='dolorum', + default_currency='USD', + email_address='ad', + id='f3cabd90-5a97-42e0-9672-8227b2d30947', metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - phone='1-223-679-7768 x019', - registration_number='sunt', + phone='946.496.5489 x3236', + registration_number='voluptas', source_modified_date='2022-10-23T00:00:00.000Z', status=shared.CustomerStatus.ACTIVE, supplemental_data=shared.SupplementalData( content={ - "quidem": { - "a": 'et', - "ipsam": 'eos', - "exercitationem": 'minima', - "laudantium": 'quibusdam', - }, - "fuga": { - "excepturi": 'corporis', - "nam": 'itaque', - "suscipit": 'porro', + "recusandae": { + "corporis": 'non', }, }, ), - tax_number='nulla', + tax_number='necessitatibus', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=10447, + timeout_in_minutes=719469, ) res = s.customers.create(req) @@ -230,7 +135,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -242,7 +147,7 @@ req = operations.DownloadCustomerAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='qui', + customer_id='maiores', ) res = s.customers.download_attachment(req) @@ -279,7 +184,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -289,7 +194,7 @@ s = codataccounting.CodatAccounting( req = operations.GetCustomerRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - customer_id='in', + customer_id='laboriosam', ) res = s.customers.get(req) @@ -324,7 +229,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -336,7 +241,7 @@ req = operations.GetCustomerAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='enim', + customer_id='voluptatem', ) res = s.customers.get_attachment(req) @@ -375,7 +280,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -420,7 +325,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -433,7 +338,7 @@ req = operations.ListCustomersRequest( order_by='-modifiedDate', page=1, page_size=100, - query='vel', + query='optio', ) res = s.customers.list(req) @@ -468,7 +373,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -479,7 +384,7 @@ s = codataccounting.CodatAccounting( req = operations.ListCustomerAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='impedit', + customer_id='sequi', ) res = s.customers.list_attachments(req) @@ -530,154 +435,65 @@ req = operations.UpdateCustomerRequest( customer=shared.Customer( addresses=[ shared.Addressesitems( - city='West Marcelina', - country='Palestinian Territory', - line1='labore', - line2='adipisci', - postal_code='73480', - region='esse', - type=shared.AddressType.BILLING, + city='North Wavatown', + country='Cameroon', + line1='amet', + line2='rerum', + postal_code='38123', + region='dignissimos', + type=shared.AccountingAddressType.DELIVERY, ), ], - contact_name='amet', + contact_name='itaque', contacts=[ shared.Contact( address=shared.Addressesitems( - city='East Abdul', - country='Libyan Arab Jamahiriya', - line1='eligendi', - line2='qui', - postal_code='95501', - region='repellendus', - type=shared.AddressType.BILLING, + city='Lake Alexannefield', + country='Seychelles', + line1='quos', + line2='possimus', + postal_code='45906-1548', + region='unde', + type=shared.AccountingAddressType.UNKNOWN, ), - email='Verona.Abshire34@gmail.com', + email='Clifford71@hotmail.com', modified_date='2022-10-23T00:00:00.000Z', - name='Ray Pfannerstill', - phone=[ - shared.PhoneNumbersitems( - number='(877) 492-8687', - type=shared.PhoneNumberType.LANDLINE, - ), - shared.PhoneNumbersitems( - number='01224 658 999', - type=shared.PhoneNumberType.UNKNOWN, - ), - ], - status=shared.CustomerStatus.ACTIVE, - ), - shared.Contact( - address=shared.Addressesitems( - city='Windlerfort', - country='Brazil', - line1='rem', - line2='itaque', - postal_code='74945-4921', - region='recusandae', - type=shared.AddressType.UNKNOWN, - ), - email='May.Donnelly89@gmail.com', - modified_date='2022-10-23T00:00:00.000Z', - name='Myra Hermann', - phone=[ - shared.PhoneNumbersitems( - number='01224 658 999', - type=shared.PhoneNumberType.UNKNOWN, - ), - ], - status=shared.CustomerStatus.UNKNOWN, - ), - shared.Contact( - address=shared.Addressesitems( - city='Lake Roxaneburgh', - country='Sao Tome and Principe', - line1='iste', - line2='earum', - postal_code='77302', - region='repellat', - type=shared.AddressType.BILLING, - ), - email='Columbus_Moore82@hotmail.com', - modified_date='2022-10-23T00:00:00.000Z', - name='Duane Dibbert DVM', - phone=[ - shared.PhoneNumbersitems( - number='(877) 492-8687', - type=shared.PhoneNumberType.MOBILE, - ), - shared.PhoneNumbersitems( - number='01224 658 999', - type=shared.PhoneNumberType.PRIMARY, - ), - shared.PhoneNumbersitems( - number='(877) 492-8687', - type=shared.PhoneNumberType.LANDLINE, - ), - ], - status=shared.CustomerStatus.UNKNOWN, - ), - shared.Contact( - address=shared.Addressesitems( - city='Lexifurt', - country='Somalia', - line1='molestiae', - line2='officiis', - postal_code='50466-9029', - region='dolorem', - type=shared.AddressType.UNKNOWN, - ), - email='Lizeth_Kuhlman@hotmail.com', - modified_date='2022-10-23T00:00:00.000Z', - name='Nicolas Walker I', + name='Ralph Hamill', phone=[ shared.PhoneNumbersitems( number='01224 658 999', type=shared.PhoneNumberType.FAX, ), ], - status=shared.CustomerStatus.UNKNOWN, + status=shared.CustomerStatus.ARCHIVED, ), ], - customer_name='commodi', - default_currency='EUR', - email_address='temporibus', - id='368ba921-6bcb-4415-835c-73641723133e', + customer_name='accusamus', + default_currency='GBP', + email_address='quas', + id='8b1c4ee2-c8c6-4ce6-91fe-eb1c7cbdb6ee', metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - phone='224-783-1427 x78625', - registration_number='dolores', + phone='424.676.1311 x442', + registration_number='odio', source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.CustomerStatus.ACTIVE, + status=shared.CustomerStatus.ARCHIVED, supplemental_data=shared.SupplementalData( content={ - "non": { - "maxime": 'aspernatur', - }, - "magni": { - "minima": 'ipsam', - "sequi": 'quaerat', - "accusantium": 'incidunt', - "cupiditate": 'minima', - }, - "quo": { - "facere": 'quidem', - "harum": 'adipisci', - }, - "optio": { - "reprehenderit": 'quo', - "vitae": 'voluptates', + "cupiditate": { + "illo": 'exercitationem', }, }, ), - tax_number='tempora', + tax_number='laborum', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - customer_id='iste', + customer_id='illum', force_update=False, - timeout_in_minutes=560736, + timeout_in_minutes=147989, ) res = s.customers.update(req) diff --git a/previous-versions/accounting/docs/sdks/directcosts/README.md b/previous-versions/accounting/docs/sdks/directcosts/README.md index f6a2d0206..e528e94c6 100755 --- a/previous-versions/accounting/docs/sdks/directcosts/README.md +++ b/previous-versions/accounting/docs/sdks/directcosts/README.md @@ -19,7 +19,7 @@ Direct costs The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company's connection. -[Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. +[Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are the expenses associated with a business' operations. For example, purchases of raw materials that are paid off at the point of the purchase and service fees are considered direct costs. **Integration-specific behaviour** @@ -33,6 +33,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -43,128 +44,100 @@ s = codataccounting.CodatAccounting( req = operations.CreateDirectCostRequest( direct_cost=shared.DirectCost( contact_ref=shared.ContactRef( - data_type='beatae', - id='e8aa257d-dc19-412e-bde6-4bfcc5469d40', + data_type='maxime', + id='af5dd672-3dc0-4f5a-a2f3-a6b700878756', ), currency='GBP', - currency_rate=3383.08, - id='dfa79620-6bef-42b0-a3e4-2c1aa010e9aa', + currency_rate=Decimal('3086.58'), + id='3f5a6c98-b555-4540-80d4-0bcacc6cbd6b', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.DirectCostLineItem( account_ref=shared.AccountRef( - id='e9135586-d18f-49f9-ba4b-fad2bf7d67ca', - name='Edwin Olson', + id='f3ec9093-04f9-426b-ad25-53819b474b0e', + name='Steve Barrows', ), - description='unde', - discount_amount=7121.86, - discount_percentage=2626.11, + description='ea', + discount_amount=Decimal('1799.06'), + discount_percentage=Decimal('3052.67'), item_ref=shared.ItemRef( - id='1d612435-3187-40cf-a8b0-3ad421bd43d1', - name='Larry Sanford MD', + id='8fff639a-910a-4bdc-ab62-676696e1ec00', + name='Kathryn Bruen', ), - quantity=393.88, - sub_total=81.99, - tax_amount=210.15, + quantity=Decimal('2274.31'), + sub_total=Decimal('3466.08'), + tax_amount=Decimal('8470.18'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=2214.8, - id='eb22d9b3-a70d-494f-aa74-1c57d1fedc20', - name='Michelle Sipes', + effective_tax_rate=Decimal('5065.32'), + id='9acb3ecf-da8d-40c5-89ef-03004978a61f', + name='Peter Schmitt', ), - total_amount=8630.37, + total_amount=Decimal('349.89'), tracking=shared.Tracking( invoice_to=shared.TrackingRecordReference( - data_type='quo', - id='3ce18547-2f9e-4e69-966a-8be3444eac8b', + data_type='invoice', + id='88f77c1f-fc71-4dca-963f-2a3c80a97ff3', ), record_refs=[ shared.InvoiceTo( - data_type='laborum', - id='2875c6c1-fe60-46d0-bd2a-9c87ae50c166', + data_type='journalEntry', + id='4cddf857-a9e6-4187-ac6a-b21d29dfc94d', ), ], ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='1a1d9136-a7e8-4d53-a13f-3f658752db76', - name='Jody Hegmann', - ), - shared.TrackingCategoryRef( - id='0a56cebc-ada2-49ca-b918-1c95671663c5', - name='Cynthia Reichert', + id='6fecd799-3900-466a-ad2d-000355338cec', + name='Lena Kerluke', ), ], - unit_amount=3905.83, + unit_amount=Decimal('1440.58'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='et', + note='necessitatibus', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', - currency='USD', - currency_rate=2495.41, - total_amount=3829.28, + currency='GBP', + currency_rate=Decimal('3690.99'), + total_amount=Decimal('1631.81'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='38512ab2-521b-49f2-a072-467b8a40bc05', - name='Dr. Omar Reinger', + id='cb311916-7b8e-43c8-9b03-408d6d364ffd', + name='Jill Hermann III', ), - currency='USD', - currency_rate=196.1, - id='edf22a94-d20e-4c90-aa41-d1f465e85156', - note='repellat', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='a', - total_amount=4778.26, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', currency='EUR', - currency_rate=8372.02, - total_amount=9459.21, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='54fdd5ea-9543-4398-9afb-42a8d63388e4', - name='Casey Anderson', - ), - currency='EUR', - currency_rate=6353.96, - id='5f9b18a2-44fd-4619-839d-acd38ed0dc67', - note='et', + currency_rate=Decimal('1168.67'), + id='263d48e9-35c2-4c9e-81f3-0be3e43202d7', + note='magni', paid_on_date='2022-10-23T00:00:00.000Z', - reference='optio', - total_amount=4654.86, + reference='aliquid', + total_amount=Decimal('3216.97'), ), ), ], - reference='delectus', + reference='voluptate', source_modified_date='2022-10-23T00:00:00.000Z', - sub_total=8783.61, + sub_total=Decimal('3249.99'), supplemental_data=shared.SupplementalData( content={ - "culpa": { - "quasi": 'veniam', - "provident": 'consequuntur', - "aut": 'maxime', - "provident": 'aperiam', + "sit": { + "vel": 'laboriosam', }, }, ), - tax_amount=8337.06, - total_amount=664.08, + tax_amount=Decimal('3112.47'), + total_amount=Decimal('941.22'), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=741454, + timeout_in_minutes=525223, ) res = s.direct_costs.create(req) @@ -199,7 +172,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -211,7 +184,7 @@ req = operations.DownloadDirectCostAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_cost_id='magnam', + direct_cost_id='dignissimos', ) res = s.direct_costs.download_attachment(req) @@ -248,7 +221,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -259,7 +232,7 @@ s = codataccounting.CodatAccounting( req = operations.GetDirectCostRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_cost_id='natus', + direct_cost_id='doloremque', ) res = s.direct_costs.get(req) @@ -294,7 +267,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -306,7 +279,7 @@ req = operations.GetDirectCostAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_cost_id='aperiam', + direct_cost_id='assumenda', ) res = s.direct_costs.get_attachment(req) @@ -345,7 +318,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -390,7 +363,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -404,7 +377,7 @@ req = operations.ListDirectCostsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='dicta', + query='provident', ) res = s.direct_costs.list(req) @@ -439,7 +412,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -450,7 +423,7 @@ s = codataccounting.CodatAccounting( req = operations.ListDirectCostAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_cost_id='repellat', + direct_cost_id='facere', ) res = s.direct_costs.list_attachments(req) @@ -489,7 +462,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -499,12 +472,12 @@ s = codataccounting.CodatAccounting( req = operations.UploadDirectCostAttachmentRequest( request_body=operations.UploadDirectCostAttachmentRequestBody( - content='dolores'.encode(), - request_body='harum', + content='sed'.encode(), + request_body='inventore', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_cost_id='quibusdam', + direct_cost_id='voluptatibus', ) res = s.direct_costs.upload_attachment(req) diff --git a/previous-versions/accounting/docs/sdks/directincomes/README.md b/previous-versions/accounting/docs/sdks/directincomes/README.md index debd06ae3..c47aedea9 100755 --- a/previous-versions/accounting/docs/sdks/directincomes/README.md +++ b/previous-versions/accounting/docs/sdks/directincomes/README.md @@ -19,7 +19,7 @@ Direct incomes The *Create direct income* endpoint creates a new [direct income](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company's connection. -[Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. +[Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes. **Integration-specific behaviour** @@ -33,6 +33,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -43,259 +44,88 @@ s = codataccounting.CodatAccounting( req = operations.CreateDirectIncomeRequest( direct_income=shared.DirectIncome( contact_ref=shared.ContactRef( - data_type='totam', - id='9c8a3263-9da5-4b7b-a902-b881a94f6436', + data_type='unde', + id='ad030c4e-cc11-4a08-b642-9068b8502a55', ), - currency='USD', - currency_rate=2725.62, - id='a8f0af8c-691d-4732-99fb-af9476a2ae8d', + currency='EUR', + currency_rate=Decimal('4813.07'), + id='f73bc845-e320-4a31-9f4b-adf947c9a867', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.DirectIncomeLineItem( account_ref=shared.AccountRef( - id='50c8a351-2c73-4784-8930-750a00e966ec', - name='Florence Keeling', - ), - description='neque', - discount_amount=816.89, - discount_percentage=6064.72, - item_ref=shared.ItemRef( - id='4398c783-c923-498e-93d3-ab7ca3c5ca86', - name='Isabel Okuneva DDS', - ), - quantity=9687.73, - sub_total=8458.89, - tax_amount=3297, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=8638.28, - id='6989b720-6451-4077-919e-a83d492ed14b', - name='Blake Connelly V', - ), - total_amount=3475.83, - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='545e955d-cc18-45ea-8901-c7c43ad2daa7', - name='Troy Murphy', - ), - shared.TrackingCategoryRef( - id='3d230edf-7381-41a1-9538-2bd7ed565076', - name='Christine Sauer', - ), - ], - unit_amount=9851.55, - ), - shared.DirectIncomeLineItem( - account_ref=shared.AccountRef( - id='4d739656-4c20-4a07-91a9-61d24a7dbb8f', - name='Shannon Cremin', + id='c4242666-5816-4ddc-a8ef-51fcb4c593ec', + name='Beverly Satterfield', ), - description='perspiciatis', - discount_amount=1421.56, - discount_percentage=7540.53, + description='id', + discount_amount=Decimal('8409.92'), + discount_percentage=Decimal('590.23'), item_ref=shared.ItemRef( - id='f7812cb5-12c8-4782-80bf-548f88f8f1bf', - name='Hannah Schmidt', + id='ec7afedb-d80d-4f44-8a47-f9390c588809', + name='Manuel Swift', ), - quantity=1202.57, - sub_total=9822.77, - tax_amount=1756.76, + quantity=Decimal('9830.6'), + sub_total=Decimal('6229.68'), + tax_amount=Decimal('9261.19'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=195.51, - id='6d5d831d-0081-4090-b670-6673f3a681c5', - name='Vera Kutch', + effective_tax_rate=Decimal('9559.62'), + id='3ffdd9f7-f079-4af4-9357-24cdb0f4d281', + name='Irma Kub', ), - total_amount=9328.07, + total_amount=Decimal('4357.13'), tracking_category_refs=[ shared.TrackingCategoryRef( - id='42409a21-5e08-4601-889a-5f63e3af3dd9', - name='Marty Nikolaus', - ), - shared.TrackingCategoryRef( - id='dcd63483-e4a7-4a98-a4df-37e45b8955d4', - name='Mrs. Tracy Walker', + id='844eded8-5a90-465e-a28b-dfc2032b6c87', + name='Alejandro Considine', ), ], - unit_amount=2578.35, - ), - shared.DirectIncomeLineItem( - account_ref=shared.AccountRef( - id='82310907-bd35-44c0-92bd-734f02449d86', - name='Edwin Rath', - ), - description='eaque', - discount_amount=9915.63, - discount_percentage=8906.06, - item_ref=shared.ItemRef( - id='5d911cbf-e749-4caf-85a2-7f69e2c9e6d1', - name='Henrietta Moen', - ), - quantity=2060.11, - sub_total=6648.58, - tax_amount=8344.57, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=2719.56, - id='c6b03108-d9c3-4374-b308-2b94f2ab1fd5', - name='Glenda Boehm', - ), - total_amount=7725.66, - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='26350a46-7143-4789-8e0e-991594d93a74', - name='Jeffrey Dare', - ), - ], - unit_amount=9545.42, - ), - shared.DirectIncomeLineItem( - account_ref=shared.AccountRef( - id='e3b4b4db-8b77-48eb-b6e1-d2cf502bafb2', - name='Archie Schroeder', - ), - description='adipisci', - discount_amount=3732.03, - discount_percentage=8526.23, - item_ref=shared.ItemRef( - id='5e65da02-8c3e-4951-a1e3-0fda966489d7', - name='Darryl Kuvalis', - ), - quantity=2412.36, - sub_total=8992.58, - tax_amount=844.51, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=2323.42, - id='a12a6b99-2494-4594-887f-5c843836b86b', - name='Adrienne Stokes', - ), - total_amount=2950.58, - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='5b0449f9-df13-4f4e-adbe-78bf60682589', - name='Kelley Nader', - ), - ], - unit_amount=2274.52, + unit_amount=Decimal('4766.14'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='corporis', + note='vitae', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', currency='GBP', - currency_rate=4549.34, - total_amount=5910.92, + currency_rate=Decimal('5398.86'), + total_amount=Decimal('2847.79'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='5b785148-d6d5-449e-9635-b33bc0f970c4', - name='Shari Schmeler', - ), - currency='GBP', - currency_rate=5170.23, - id='44225e75-b796-4065-80ef-a6f93b90a1b8', - note='eligendi', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='veniam', - total_amount=7243.07, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', - currency='GBP', - currency_rate=1317.05, - total_amount=3572.56, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='4b739f4f-e772-410d-9f65-58c99c722d2b', - name='Steven Weimann', - ), - currency='GBP', - currency_rate=5286.46, - id='7d9caae0-42dd-47ca-ac9b-4caa1cfe9e15', - note='nulla', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='molestias', - total_amount=576.67, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', - currency='USD', - currency_rate=455.46, - total_amount=4952.25, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='f3783198-3d42-4e54-a854-66597c50233c', - name='Dr. Pauline Koss', - ), - currency='GBP', - currency_rate=6798.99, - id='aa6ddf5a-bd64-487c-9fc2-b862a00bef69', - note='saepe', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='aperiam', - total_amount=617.28, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', - currency='GBP', - currency_rate=4998.83, - total_amount=3808.84, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='30bda7af-ded8-44a3-9a41-238e1a735ac2', - name='Kristi Turcotte', + id='f7ae12c6-891f-482c-a115-7172305377dc', + name='Horace Leannon', ), currency='EUR', - currency_rate=9305.47, - id='f971a8f4-6bca-4110-afe9-65b711d08cf8', - note='deleniti', + currency_rate=Decimal('6081.72'), + id='75e35668-6092-4e9c-bddc-5f111dea1026', + note='pariatur', paid_on_date='2022-10-23T00:00:00.000Z', - reference='cumque', - total_amount=6116.3, + reference='numquam', + total_amount=Decimal('1031.93'), ), ), ], - reference='reiciendis', + reference='est', source_modified_date='2022-10-23T00:00:00.000Z', - sub_total=7293.47, + sub_total=Decimal('8167.26'), supplemental_data=shared.SupplementalData( content={ - "occaecati": { - "nemo": 'quis', - "doloremque": 'similique', - "eum": 'quis', - }, - "commodi": { - "possimus": 'dolor', - "ratione": 'velit', - "soluta": 'cum', - "accusantium": 'quo', - }, - "officiis": { - "est": 'fuga', - "autem": 'quis', - "modi": 'consectetur', + "vitae": { + "omnis": 'alias', }, }, ), - tax_amount=1844.01, - total_amount=6424.34, + tax_amount=Decimal('9574.89'), + total_amount=Decimal('8876'), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=585645, + timeout_in_minutes=708883, ) res = s.direct_incomes.create(req) @@ -330,7 +160,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -342,7 +172,7 @@ req = operations.DownloadDirectIncomeAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_income_id='rem', + direct_income_id='quia', ) res = s.direct_incomes.download_attachment(req) @@ -379,7 +209,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -390,7 +220,7 @@ s = codataccounting.CodatAccounting( req = operations.GetDirectIncomeRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_income_id='ea', + direct_income_id='vitae', ) res = s.direct_incomes.get(req) @@ -425,7 +255,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -437,8 +267,8 @@ req = operations.GetDirectIncomeAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_income_id='debitis', - timeout_in_minutes=743023, + direct_income_id='odio', + timeout_in_minutes=558410, ) res = s.direct_incomes.get_attachment(req) @@ -477,7 +307,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -522,7 +352,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -536,7 +366,7 @@ req = operations.ListDirectIncomesRequest( order_by='-modifiedDate', page=1, page_size=100, - query='odio', + query='ipsa', ) res = s.direct_incomes.list(req) @@ -571,7 +401,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -582,7 +412,7 @@ s = codataccounting.CodatAccounting( req = operations.ListDirectIncomeAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_income_id='eveniet', + direct_income_id='distinctio', ) res = s.direct_incomes.list_attachments(req) @@ -621,7 +451,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -631,12 +461,12 @@ s = codataccounting.CodatAccounting( req = operations.UploadDirectIncomeAttachmentRequest( request_body=operations.UploadDirectIncomeAttachmentRequestBody( - content='beatae'.encode(), - request_body='dolore', + content='placeat'.encode(), + request_body='quod', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - direct_income_id='quisquam', + direct_income_id='eligendi', ) res = s.direct_incomes.upload_attachment(req) diff --git a/previous-versions/accounting/docs/sdks/invoices/README.md b/previous-versions/accounting/docs/sdks/invoices/README.md index 09b9eb5dc..b8cd055c3 100755 --- a/previous-versions/accounting/docs/sdks/invoices/README.md +++ b/previous-versions/accounting/docs/sdks/invoices/README.md @@ -36,6 +36,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -45,407 +46,132 @@ s = codataccounting.CodatAccounting( req = operations.CreateInvoiceRequest( invoice=shared.Invoice( - additional_tax_amount=6499.01, - additional_tax_percentage=3702.19, - amount_due=4227.22, - currency='GBP', - currency_rate=427.39, - customer_ref=shared.CustomerRef( - company_name='atque', - id='91500970-19a4-48f8-8ece-7bf904e01105', + additional_tax_amount=Decimal('263.21'), + additional_tax_percentage=Decimal('8197.57'), + amount_due=Decimal('7188.79'), + currency='EUR', + currency_rate=Decimal('8256.81'), + customer_ref=shared.AccountingCustomerRef( + company_name='illum', + id='b484708f-b4e3-491e-abc1-58c4c4e54599', ), - discount_percentage=8370.8, + discount_percentage=Decimal('9294.43'), due_date='2022-10-23T00:00:00.000Z', - id='8908162c-6beb-468a-8f65-7b7d03a1480f', - invoice_number='blanditiis', + id='342260e9-b200-4ce7-8a1b-d8fb7a0a116c', + invoice_number='officiis', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.InvoiceLineItem( account_ref=shared.AccountRef( - id='30f069d8-1061-48d9-be15-2297510da803', - name='Janice Cronin', + id='23d4097f-a30e-49af-b25b-29122030d83f', + name='Rosie Waters', ), - description='nobis', - discount_amount=7615.63, - discount_percentage=3870.67, + description='dignissimos', + discount_amount=Decimal('5920.88'), + discount_percentage=Decimal('5818.89'), is_direct_income=False, item_ref=shared.ItemRef( - id='1c2a702b-b97e-4e10-ada2-de35f8e01bf3', - name='Silvia Murazik', + id='d22e8c1f-8493-4825-bdc4-2c876c2c2dfb', + name='Sheri Weissnat DDS', ), - quantity=2836.19, - sub_total=3304.68, - tax_amount=2609.08, + quantity=Decimal('4608.03'), + sub_total=Decimal('3920.8'), + tax_amount=Decimal('1296.19'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=619.54, - id='2ac1704b-f1cc-49fc-a1aa-e5eb5f0c492b', - name='Jackie Graham', + effective_tax_rate=Decimal('1974.41'), + id='0f841fb1-bd23-4fdb-94db-6be5a685998e', + name='Wanda Osinski', ), - total_amount=406.34, + total_amount=Decimal('276.53'), tracking=shared.Propertiestracking1( category_refs=[ shared.TrackingCategoryRef( - id='a2267aae-e79e-43c7-9ad3-1becb83d2378', - name='Rogelio Doyle', - ), - shared.TrackingCategoryRef( - id='c23d9450-a986-4a49-9bac-707f06b28ecc', - name='Raul Gerlach I', - ), - shared.TrackingCategoryRef( - id='86f62c96-9c4c-4c6b-b889-0a3fd3c81da1', - name='Tabitha Lesch', + id='da16fc2b-271a-4289-857e-854e90439d22', + name='Monica Johnson', ), ], - customer_ref=shared.CustomerRef( - company_name='non', - id='df931da3-edb5-41fa-994a-cc9435137726', + customer_ref=shared.AccountingCustomerRef( + company_name='cupiditate', + id='46240708-4f7a-4b37-8ef0-2225194db554', ), - is_billed_to=shared.BilledToType1.PROJECT, + is_billed_to=shared.BilledToType1.UNKNOWN, is_rebilled_to=shared.BilledToType1.UNKNOWN, project_ref=shared.ProjectRef( - id='5321b832-a56d-4691-80ff-60eb9a6658e6', - name='Grant Fritsch', + id='adc669af-90a2-46c7-8dc9-81f068981d6b', + name='Norman Ferry', ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='3d382dbe-c75c-468c-a065-9468ce304d88', - name='Shelly Quitzon', - ), - shared.TrackingCategoryRef( - id='214c337f-96bb-40c6-9e37-2db1344ba9f7', - name='Ernesto Heaney PhD', - ), - ], - unit_amount=8162.72, - ), - shared.InvoiceLineItem( - account_ref=shared.AccountRef( - id='7aab62e9-7261-4fb0-858d-27b51996b5b4', - name='Jon Bashirian', - ), - description='sapiente', - discount_amount=4822.43, - discount_percentage=988.3, - is_direct_income=False, - item_ref=shared.ItemRef( - id='2b7a7ab0-344b-4171-8688-deebef897f3d', - name='Mark Schmidt', - ), - quantity=2232.35, - sub_total=2259.45, - tax_amount=9483.01, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=979.03, - id='1b3e4e08-0aa1-4041-86ec-759e02f3702c', - name='Blanca Langworth', - ), - total_amount=8570.75, - tracking=shared.Propertiestracking1( - category_refs=[ - shared.TrackingCategoryRef( - id='0ead3104-fa44-4707-bf37-5b44282821fd', - name='Aaron Weimann', - ), - ], - customer_ref=shared.CustomerRef( - company_name='eveniet', - id='59267c71-cc8d-43cd-8258-d0358a82c808', - ), - is_billed_to=shared.BilledToType1.PROJECT, - is_rebilled_to=shared.BilledToType1.PROJECT, - project_ref=shared.ProjectRef( - id='2751a204-7c04-449e-943f-9619bb7d40d5', - name='Eric Bergnaum', + record_ref=shared.InvoiceTo( + data_type='accountTransaction', + id='a348c31b-f407-4ee4-bcf0-c42b78f15626', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='36e62592-33f9-45c9-9237-397c785b5db4', - name='Mr. Wesley Ankunding', - ), - shared.TrackingCategoryRef( - id='3febdf67-6b72-406d-ab75-0052a5647edc', - name='Annie Morissette', + id='398a0dc7-6632-44cc-b06c-8ca12d025292', + name='Patricia Pouros', ), ], - unit_amount=5481.43, - ), - shared.InvoiceLineItem( - account_ref=shared.AccountRef( - id='c4320f41-240d-4448-bac6-93b94c3b9d24', - name='Guy Spinka', - ), - description='ad', - discount_amount=6383.23, - discount_percentage=6864.21, - is_direct_income=False, - item_ref=shared.ItemRef( - id='42fc4056-69f6-49a0-86d2-1249450819d7', - name='Miss Nathan Ritchie', - ), - quantity=745.3, - sub_total=5385.16, - tax_amount=2986.57, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=2793.53, - id='060e0031-0d02-43dc-901f-5afd2a6c4484', - name='Genevieve Waters', - ), - total_amount=5056.63, - tracking=shared.Propertiestracking1( - category_refs=[ - shared.TrackingCategoryRef( - id='253c8962-f489-46bf-91e4-652d3c343d61', - name='Stella Littel', - ), - shared.TrackingCategoryRef( - id='49124772-5e62-4190-9e91-044a5de59ac7', - name='Jessica Hyatt', - ), - shared.TrackingCategoryRef( - id='0cf1cf59-3260-4525-9e66-bb426897d99a', - name='Christie Frami', - ), - ], - customer_ref=shared.CustomerRef( - company_name='suscipit', - id='70e93ee6-cf59-4f35-8aae-acae323a31bf', - ), - is_billed_to=shared.BilledToType1.NOT_APPLICABLE, - is_rebilled_to=shared.BilledToType1.PROJECT, - project_ref=shared.ProjectRef( - id='a1cc9771-6c80-42cc-9e0c-7d9d323f1aa6', - name='Cecelia Stoltenberg', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='1c856bcb-a51e-4f24-94a4-7facf116cdd5', - name='Jamie Funk', - ), - shared.TrackingCategoryRef( - id='562873c7-dd9e-4faf-83dc-623620f3138f', - name='Michelle Stroman', - ), - shared.TrackingCategoryRef( - id='db022faa-565f-4b8f-a52e-bb9d38383879', - name='Beverly Green', - ), - shared.TrackingCategoryRef( - id='293dab30-e917-4f50-bda0-4c8b1bb55a29', - name='Karla Armstrong', - ), - ], - unit_amount=2482.32, - ), - shared.InvoiceLineItem( - account_ref=shared.AccountRef( - id='bb744664-eb1d-4033-88b0-d1bb17afee74', - name='Hector Willms', - ), - description='occaecati', - discount_amount=2897.27, - discount_percentage=3697.22, - is_direct_income=False, - item_ref=shared.ItemRef( - id='7c7edaf3-9d16-4fbf-b6fd-162b303e3023', - name='Andy Erdman', - ), - quantity=2724.93, - sub_total=1973.88, - tax_amount=893.2, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=3986.87, - id='cf55b431-3553-4ccf-9c20-4c4adcc9904c', - name='Debra Medhurst', - ), - total_amount=5405.93, - tracking=shared.Propertiestracking1( - category_refs=[ - shared.TrackingCategoryRef( - id='48cefa78-f1e2-4d3b-901e-0952bbb4cbb1', - name='Mrs. Courtney Kuhic', - ), - shared.TrackingCategoryRef( - id='95a4169c-1387-4271-a18e-a9e45118c2cc', - name='Dora White', - ), - ], - customer_ref=shared.CustomerRef( - company_name='aliquid', - id='0b1a78ed-29a9-4d4e-aa85-658c2d4f4c88', - ), - is_billed_to=shared.BilledToType1.PROJECT, - is_rebilled_to=shared.BilledToType1.PROJECT, - project_ref=shared.ProjectRef( - id='4f278fd9-667e-446c-91d2-ffaa58dcef23', - name='Alexandra Morissette', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='9bdf2190-abd9-4bbc-8272-5ec2659ce028', - name='Miss Priscilla Gerhold', - ), - shared.TrackingCategoryRef( - id='9ef68e45-c8ad-4dfa-8754-500430c6632b', - name='Dr. Carmen McKenzie', - ), - shared.TrackingCategoryRef( - id='f01c3e91-e8f7-4bc6-9d46-0a77eceb26d1', - name='Lorene Bosco', - ), - ], - unit_amount=1818.77, + unit_amount=Decimal('3689.76'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='neque', + note='fugit', paid_on_date='2022-10-23T00:00:00.000Z', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', currency='EUR', - currency_rate=461.37, - total_amount=9654.91, + currency_rate=Decimal('5062.02'), + total_amount=Decimal('5749.9'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='0f873f9d-5c25-4fd3-a0b4-a4a4253c3025', - name='Julie Bergstrom', + id='5b8bcf24-db95-4969-b352-f74533994d78', + name='Elbert Fay', ), - currency='GBP', - currency_rate=8074.3, - id='7e7dc548-be09-4e41-a7a2-15ca12a4ba9d', - note='ipsam', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='omnis', - total_amount=5229.85, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', - currency='GBP', - currency_rate=5952.02, - total_amount=1465.4, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='cfd0c77c-53e7-4e7d-8ee6-e8b90bac384e', - name='Cindy Marquardt', - ), - currency='GBP', - currency_rate=1935.64, - id='fec31c50-824d-4189-a36a-6b2d27eb707a', - note='est', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='aut', - total_amount=8090.72, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', currency='EUR', - currency_rate=8853.36, - total_amount=2924.31, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='6e6177db-9db3-4b70-bfbb-6970ee770e36', - name='Violet Kshlerin', - ), - currency='USD', - currency_rate=8024.72, - id='206e61b0-d308-4714-820a-3d98637ca85c', - note='adipisci', - paid_on_date='2022-10-23T00:00:00.000Z', - reference='repudiandae', - total_amount=4193.51, - ), - ), - shared.Items( - allocation=shared.ItemsAllocation( - allocated_on_date='2022-10-23T00:00:00.000Z', - currency='GBP', - currency_rate=4780.21, - total_amount=2820.79, - ), - payment=shared.PaymentAllocationPayment( - account_ref=shared.AccountRef( - id='dbaf94a7-c98f-413a-b28d-b2cf2bf4f3de', - name='Vincent Hansen', - ), - currency='USD', - currency_rate=8883.28, - id='14b21cd9-8196-4d55-af69-a1c4b79ae336', - note='praesentium', + currency_rate=Decimal('6104.9'), + id='389f5abb-7f66-4255-8a28-382ac483afd2', + note='consectetur', paid_on_date='2022-10-23T00:00:00.000Z', - reference='eligendi', - total_amount=1805.44, + reference='minima', + total_amount=Decimal('7036.51'), ), ), ], sales_order_refs=[ shared.SalesOrderRef( - data_type='eligendi', - id='39a7c0e1-7cb1-42c5-ba82-5fe22cd5cba6', + data_type='facilis', + id='a650164e-06f5-4bf6-ae59-1bc8bdef3612', ), ], source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.InvoiceStatus.PAID, - sub_total=9961.28, + status=shared.InvoiceStatus.SUBMITTED, + sub_total=Decimal('2033.96'), supplemental_data=shared.SupplementalData( content={ - "quisquam": { - "amet": 'consequuntur', - "fuga": 'a', - "aliquid": 'voluptatum', - }, - "sunt": { - "illum": 'ea', - }, - "veniam": { - "delectus": 'earum', - "placeat": 'saepe', - "quod": 'odit', - }, - "assumenda": { - "ea": 'provident', - "inventore": 'ea', - "repellat": 'quam', - "delectus": 'minus', + "quod": { + "eos": 'alias', }, }, ), - total_amount=4677.01, - total_discount=8447.75, - total_tax_amount=8284.89, + total_amount=Decimal('3198.07'), + total_discount=Decimal('9545.95'), + total_tax_amount=Decimal('8168.25'), withholding_tax=[ shared.WithholdingTaxitems( - amount=4773.62, - name='Kate Schowalter PhD', - ), - shared.WithholdingTaxitems( - amount=3877.68, - name='Melinda Heaney', - ), - shared.WithholdingTaxitems( - amount=2559.53, - name='Milton Bogisich I', + amount=Decimal('6625.15'), + name='Alex Bayer', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=787873, + timeout_in_minutes=264073, ) res = s.invoices.create(req) @@ -502,7 +228,7 @@ Integrations that support soft delete do not permanently delete the object in th ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -513,7 +239,7 @@ s = codataccounting.CodatAccounting( req = operations.DeleteInvoiceRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - invoice_id='facere', + invoice_id='fuga', ) res = s.invoices.delete(req) @@ -548,7 +274,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -560,7 +286,7 @@ req = operations.DownloadInvoiceAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - invoice_id='excepturi', + invoice_id='iure', ) res = s.invoices.download_attachment(req) @@ -590,7 +316,7 @@ if res.data is not None: ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -600,7 +326,7 @@ s = codataccounting.CodatAccounting( req = operations.DownloadInvoicePdfRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - invoice_id='aut', + invoice_id='deleniti', ) res = s.invoices.download_pdf(req) @@ -632,12 +358,11 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). - ### Example Usage ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -647,7 +372,7 @@ s = codataccounting.CodatAccounting( req = operations.GetInvoiceRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - invoice_id='aspernatur', + invoice_id='officia', ) res = s.invoices.get(req) @@ -682,7 +407,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -694,7 +419,7 @@ req = operations.GetInvoiceAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - invoice_id='odit', + invoice_id='sint', ) res = s.invoices.get_attachment(req) @@ -733,7 +458,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -773,12 +498,18 @@ The *List invoices* endpoint returns a list of [invoices](https://docs.codat.io/ Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). +### Useful queries + +- Outstanding invoices - `query = amountDue > 0` +- Invoices due after a certain date: `query = dueDate > 2021-01-28` + +[Read more about querying](https://docs.codat.io/using-the-api/querying). ### Example Usage ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -791,7 +522,7 @@ req = operations.ListInvoicesRequest( order_by='-modifiedDate', page=1, page_size=100, - query='molestiae', + query='laborum', ) res = s.invoices.list(req) @@ -826,7 +557,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -837,7 +568,7 @@ s = codataccounting.CodatAccounting( req = operations.ListInvoiceAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - invoice_id='recusandae', + invoice_id='dolor', ) res = s.invoices.list_attachments(req) @@ -877,6 +608,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -886,214 +618,134 @@ s = codataccounting.CodatAccounting( req = operations.UpdateInvoiceRequest( invoice=shared.Invoice( - additional_tax_amount=2046.33, - additional_tax_percentage=4704, - amount_due=7513.92, - currency='GBP', - currency_rate=8156.07, - customer_ref=shared.CustomerRef( - company_name='iste', - id='77f1a549-1abe-4975-9b10-6d23e03e6981', + additional_tax_amount=Decimal('3227.73'), + additional_tax_percentage=Decimal('8477.4'), + amount_due=Decimal('229.66'), + currency='USD', + currency_rate=Decimal('3771.94'), + customer_ref=shared.AccountingCustomerRef( + company_name='expedita', + id='6f66fef0-20e9-4f44-bb42-57b992c8dbda', ), - discount_percentage=3304.02, + discount_percentage=Decimal('4146.44'), due_date='2022-10-23T00:00:00.000Z', - id='ae99fcde-9e72-49c9-94f2-d8a44640ca60', - invoice_number='illum', + id='61efa219-8258-4fd0-a9eb-a47f7d3ef049', + invoice_number='aliquid', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.InvoiceLineItem( account_ref=shared.AccountRef( - id='3a2f93f4-67dc-40d8-9a56-122026ab8f27', - name='Eleanor Lang', - ), - description='et', - discount_amount=5825.69, - discount_percentage=4501.13, - is_direct_income=False, - item_ref=shared.ItemRef( - id='6af980da-7a08-49fc-84db-274530e5cc7c', - name='Doreen Ankunding', - ), - quantity=7667.05, - sub_total=9649.39, - tax_amount=8335.9, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=7785.2, - id='d334b6f6-23bc-4eca-b50a-ee5e0da8b9af', - name='Mrs. Alberta Stoltenberg', - ), - total_amount=5382.58, - tracking=shared.Propertiestracking1( - category_refs=[ - shared.TrackingCategoryRef( - id='e7b413cb-e2d1-476d-81c4-3d40f61d1711', - name='Joy Runolfsdottir', - ), - shared.TrackingCategoryRef( - id='5ee4f721-1840-4772-b32e-3b49dbe0f23b', - name='Lola Homenick', - ), - ], - customer_ref=shared.CustomerRef( - company_name='cupiditate', - id='48d6eded-4776-480f-87a1-7a82e5e82fd2', - ), - is_billed_to=shared.BilledToType1.NOT_APPLICABLE, - is_rebilled_to=shared.BilledToType1.PROJECT, - project_ref=shared.ProjectRef( - id='1040a7e9-1392-4ab4-8cb1-835008f461ce', - name='Robin Treutel I', - ), - ), - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='98a9ba46-0add-4fde-810c-37daa9182a49', - name='Sergio Jacobi', - ), - shared.TrackingCategoryRef( - id='d3caffc1-98ee-4a44-9279-2bcd440ea98b', - name='Guadalupe Sawayn II', - ), - ], - unit_amount=5297.99, - ), - shared.InvoiceLineItem( - account_ref=shared.AccountRef( - id='6de0d56d-73b0-4055-83e8-dc626ff77c65', - name='Courtney Hamill', + id='0d6a1831-c87a-4df5-96fd-f1ad837ae80c', + name='Blanca Brakus', ), - description='harum', - discount_amount=4443.84, - discount_percentage=256.53, + description='occaecati', + discount_amount=Decimal('3396.51'), + discount_percentage=Decimal('7343.61'), is_direct_income=False, item_ref=shared.ItemRef( - id='e3e4cfcc-6a91-4ec5-a624-d00014ef45ce', - name='Samuel Bruen', + id='a998678f-a3f6-4969-91af-388ce0361444', + name='Sylvester Kling', ), - quantity=3285.77, - sub_total=2073.91, - tax_amount=8924.85, + quantity=Decimal('4397.45'), + sub_total=Decimal('6541.99'), + tax_amount=Decimal('105.85'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=6954.27, - id='b6587f34-0414-4c5b-9ace-e400ae9f92ca', - name='Mr. Joe Rogahn', + effective_tax_rate=Decimal('9164.86'), + id='f2f53602-8efe-4ef9-b415-2ed7e253f4c1', + name='Constance Stark', ), - total_amount=9546.52, + total_amount=Decimal('6687.83'), tracking=shared.Propertiestracking1( category_refs=[ shared.TrackingCategoryRef( - id='d14718c6-fa2f-4ad0-806c-5d95472cdd14', - name='Sherman Gerlach', + id='7170f445-accf-4667-aaf9-bbad185fe431', + name='Rick Predovic', ), ], - customer_ref=shared.CustomerRef( - company_name='in', - id='0bca88fa-70c4-4335-9c3d-d1eb8f7f75f4', + customer_ref=shared.AccountingCustomerRef( + company_name='cumque', + id='838fbb8c-20cb-467f-84b4-25e99e6234c9', ), is_billed_to=shared.BilledToType1.PROJECT, - is_rebilled_to=shared.BilledToType1.UNKNOWN, + is_rebilled_to=shared.BilledToType1.NOT_APPLICABLE, project_ref=shared.ProjectRef( - id='3f1c0a58-6c3a-4e7d-bb67-feef5e142d95', - name='Ralph Stracke', + id='b79dfeb7-7a5c-438d-8baf-91e506ef890a', + name='Anita Reilly', + ), + record_ref=shared.InvoiceTo( + data_type='invoice', + id='f16f56d3-85a3-4c4a-8631-b99e26ced8f9', ), ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='eff7c4b1-56e9-4278-a75e-ea7681746806', - name='Mandy Kutch', - ), - shared.TrackingCategoryRef( - id='b7956c0b-0fa0-4bb2-8a40-e7c4ae640642', - name='Janice Jones', - ), - shared.TrackingCategoryRef( - id='b01a07c0-8fd3-4921-8257-930d6f093a3e', - name='Lorenzo Gutmann', - ), - shared.TrackingCategoryRef( - id='366dfa10-11a0-491b-bec8-b53862de1a9d', - name='Alicia Ziemann', + id='fdb9410f-63bb-4f81-b837-b01afdd78862', + name='Katherine Kuvalis', ), ], - unit_amount=1519.16, + unit_amount=Decimal('7164.1'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='ipsam', + note='labore', paid_on_date='2022-10-23T00:00:00.000Z', payment_allocations=[ shared.Items( allocation=shared.ItemsAllocation( allocated_on_date='2022-10-23T00:00:00.000Z', - currency='USD', - currency_rate=593.03, - total_amount=2423.78, + currency='GBP', + currency_rate=Decimal('9580.6'), + total_amount=Decimal('3371.49'), ), payment=shared.PaymentAllocationPayment( account_ref=shared.AccountRef( - id='03dfc338-397f-4ffa-ad1d-32090fc157ac', - name='Ms. Aubrey Thiel', + id='033f19db-f125-4ce4-952e-ab9cd7e5224a', + name='Jan Abbott Sr.', ), currency='GBP', - currency_rate=7529.61, - id='e9be41c8-69dd-47d9-b19d-07b200a58ffd', - note='consequuntur', + currency_rate=Decimal('7370.61'), + id='7847ec59-e1f6-47f3-84cc-e4b6d7696ff3', + note='eligendi', paid_on_date='2022-10-23T00:00:00.000Z', - reference='suscipit', - total_amount=4825.35, + reference='nihil', + total_amount=Decimal('2628.91'), ), ), ], sales_order_refs=[ shared.SalesOrderRef( - data_type='delectus', - id='8fd882a8-e60b-4e62-8cd9-c5afdd04c375', - ), - shared.SalesOrderRef( - data_type='aspernatur', - id='512beae1-d87e-4cc5-bdce-a8e7a8831166', - ), - shared.SalesOrderRef( - data_type='ratione', - id='cda6d77c-1d86-4066-a37d-4227866db8a7', - ), - shared.SalesOrderRef( - data_type='labore', - id='9e398451-1cc7-45e4-b0c0-04b5bb758cc9', + data_type='dignissimos', + id='501357e4-4f51-4f8b-884c-3197e193a245', ), ], source_modified_date='2022-10-23T00:00:00.000Z', status=shared.InvoiceStatus.SUBMITTED, - sub_total=3765.76, + sub_total=Decimal('4990.05'), supplemental_data=shared.SupplementalData( content={ - "delectus": { - "consequatur": 'suscipit', + "tenetur": { + "excepturi": 'modi', }, }, ), - total_amount=5771.02, - total_discount=4067.2, - total_tax_amount=5272.66, + total_amount=Decimal('5463.29'), + total_discount=Decimal('4724.29'), + total_tax_amount=Decimal('2600.46'), withholding_tax=[ shared.WithholdingTaxitems( - amount=9529.5, - name='Owen Boyer IV', - ), - shared.WithholdingTaxitems( - amount=2334.63, - name='Dwight Fritsch', + amount=Decimal('8113.8'), + name='Mable Hills', ), ], ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - invoice_id='saepe', - timeout_in_minutes=139567, + invoice_id='labore', + timeout_in_minutes=596133, ) res = s.invoices.update(req) @@ -1132,7 +784,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -1142,12 +794,12 @@ s = codataccounting.CodatAccounting( req = operations.UploadInvoiceAttachmentRequest( request_body=operations.UploadInvoiceAttachmentRequestBody( - content='modi'.encode(), - request_body='tenetur', + content='ducimus'.encode(), + request_body='qui', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - invoice_id='explicabo', + invoice_id='qui', ) res = s.invoices.upload_attachment(req) diff --git a/previous-versions/accounting/docs/sdks/items/README.md b/previous-versions/accounting/docs/sdks/items/README.md index e35fd90a3..cedf05587 100755 --- a/previous-versions/accounting/docs/sdks/items/README.md +++ b/previous-versions/accounting/docs/sdks/items/README.md @@ -29,6 +29,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -40,46 +41,46 @@ req = operations.CreateItemRequest( item=shared.Item( bill_item=shared.BillItem( account_ref=shared.AccountRef( - id='9834afb0-735c-4b62-85d4-a29aaa1e1691', - name='Alma Ziemann', + id='33e66bd8-fe5d-400b-979e-f20387320590', + name='Mr. Forrest Ryan', ), - description='aspernatur', + description='ea', tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=9264.79, - id='e209505b-f03a-493e-9448-0ca37fb10789', - name='Emily Considine', + effective_tax_rate=Decimal('2622.31'), + id='00313b3e-5044-4f65-be72-dc4077d0cc3f', + name='Carol Lowe', ), - unit_price=2261.31, + unit_price=Decimal('7738.54'), ), - code='amet', - id='3172e2dd-79ec-474b-a7e8-8ddb36fd1ccc', + code='dicta', + id='5ceb4d6e-1eae-40f7-9aed-f2acab58b991', invoice_item=shared.InvoiceItem( account_ref=shared.AccountRef( - id='341c8657-3474-4f0a-b40f-b4ab441c3a09', - name='Claude Johns', + id='c926ddb5-8946-41e7-821c-be6d9502f0ea', + name='Sean Auer', ), - description='omnis', + description='sint', tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=3289.22, - id='d808bbe7-9445-45eb-8550-a1c426b59c83', - name='Terri Zemlak', + effective_tax_rate=Decimal('9787.97'), + id='7ac2f72f-8850-4090-8911-608207888ec6', + name='Teresa Lueilwitz', ), - unit_price=7934.38, + unit_price=Decimal('9454.09'), ), is_bill_item=False, is_invoice_item=False, - item_status=shared.ItemStatus.UNKNOWN, + item_status=shared.ItemStatus.ARCHIVED, metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - name='Ida Lemke', + name='Marion Mills', source_modified_date='2022-10-23T00:00:00.000Z', - type=shared.ItemType.NON_INVENTORY, + type=shared.ItemType.UNKNOWN, ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=554193, + timeout_in_minutes=881095, ) res = s.items.create(req) @@ -116,7 +117,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -126,7 +127,7 @@ s = codataccounting.CodatAccounting( req = operations.GetItemRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - item_id='veniam', + item_id='quod', ) res = s.items.get(req) @@ -165,7 +166,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -210,7 +211,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -223,7 +224,7 @@ req = operations.ListItemsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='ad', + query='sunt', ) res = s.items.list(req) diff --git a/previous-versions/accounting/docs/sdks/journalentries/README.md b/previous-versions/accounting/docs/sdks/journalentries/README.md index 259f94f77..f6d77987a 100755 --- a/previous-versions/accounting/docs/sdks/journalentries/README.md +++ b/previous-versions/accounting/docs/sdks/journalentries/README.md @@ -30,6 +30,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -40,59 +41,30 @@ s = codataccounting.CodatAccounting( req = operations.CreateJournalEntryRequest( journal_entry=shared.JournalEntry( created_on='2022-10-23T00:00:00.000Z', - description='laudantium', - id='89d9ef93-2e90-400a-93ad-8124208efd23', + description='earum', + id='af75b0b5-32a4-4da3-bcba-af4452c4842c', journal_lines=[ shared.JournalLine( account_ref=shared.AccountRef( - id='11898e73-879e-4fbe-8bae-babb794536e9', - name='Miss Shannon Hauck', + id='9b2ad32d-afe8-41a8-8f44-44573fecd473', + name='Robin Weimann', ), - currency='unde', - description='odio', - net_amount=4332.19, + currency='placeat', + description='quos', + net_amount=Decimal('1523.02'), tracking=shared.Propertiestracking2( record_refs=[ shared.InvoiceTo( - data_type='architecto', - id='720b77a5-a536-45a7-9f15-271f01c0d361', - ), - ], - ), - ), - shared.JournalLine( - account_ref=shared.AccountRef( - id='fed8dc5e-ffb4-453e-9089-e871fdb4d697', - name='Bryant Strosin', - ), - currency='molestias', - description='corrupti', - net_amount=3623.77, - tracking=shared.Propertiestracking2( - record_refs=[ - shared.InvoiceTo( - data_type='incidunt', - id='3734a5d7-2d9e-4dd7-85be-5e7afe55297b', - ), - shared.InvoiceTo( - data_type='mollitia', - id='6281f44e-3a23-4394-a68c-c80d30ff7216', - ), - shared.InvoiceTo( - data_type='quaerat', - id='d0a91fe9-d965-453b-89e0-009c6692de7b', - ), - shared.InvoiceTo( - data_type='ipsum', - id='562201a6-aab4-4ae7-b1a5-b908d4e30491', + data_type='journalEntry', + id='9379aa69-cd5f-4bcf-b9da-18a7822bf958', ), ], ), ), ], journal_ref=shared.JournalRef( - id='aa35d4a8-39f0-43ba-b77b-918f03139845', - name='Dr. Delores Towne', + id='94e6861a-db55-4f9e-9d75-1c9fe8f7502b', + name='Orville Schinner', ), metadata=shared.Metadata( is_deleted=False, @@ -100,14 +72,14 @@ req = operations.CreateJournalEntryRequest( modified_date='2022-10-23T00:00:00.000Z', posted_on='2022-10-23T00:00:00.000Z', record_ref=shared.InvoiceTo( - data_type='quam', - id='e23ecb06-0465-42e2-ba3d-6c657e9de8f7', + data_type='accountTransaction', + id='41f17644-5637-49f3-bb27-e21f862657b3', ), source_modified_date='2022-10-23T00:00:00.000Z', supplemental_data=shared.SupplementalData( content={ - "consequatur": { - "fugiat": 'veritatis', + "delectus": { + "maxime": 'vel', }, }, ), @@ -115,7 +87,7 @@ req = operations.CreateJournalEntryRequest( ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=526773, + timeout_in_minutes=586163, ) res = s.journal_entries.create(req) @@ -177,7 +149,7 @@ Integrations that support soft delete do not permanently delete the object in th ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -188,7 +160,7 @@ s = codataccounting.CodatAccounting( req = operations.DeleteJournalEntryRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - journal_entry_id='ex', + journal_entry_id='hic', ) res = s.journal_entries.delete(req) @@ -225,7 +197,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -235,7 +207,7 @@ s = codataccounting.CodatAccounting( req = operations.GetJournalEntryRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - journal_entry_id='dolorum', + journal_entry_id='quis', ) res = s.journal_entries.get(req) @@ -274,7 +246,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -319,7 +291,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -332,7 +304,7 @@ req = operations.ListJournalEntriesRequest( order_by='-modifiedDate', page=1, page_size=100, - query='officia', + query='deleniti', ) res = s.journal_entries.list(req) diff --git a/previous-versions/accounting/docs/sdks/journals/README.md b/previous-versions/accounting/docs/sdks/journals/README.md index fb06a460b..6ce95fbc5 100755 --- a/previous-versions/accounting/docs/sdks/journals/README.md +++ b/previous-versions/accounting/docs/sdks/journals/README.md @@ -40,21 +40,21 @@ req = operations.CreateJournalRequest( journal=shared.Journal( created_on='2022-10-23T00:00:00.000Z', has_children=False, - id='9d3a1d32-329e-4458-b7e8-f2ad6bb10e25', - journal_code='ipsam', + id='ce525c67-641a-4831-ae50-47b4c21ccb42', + journal_code='amet', metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - name='Noel Gutmann PhD', - parent_id='voluptas', + name='Kim Swift', + parent_id='et', source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.JournalStatus.UNKNOWN, - type='ipsum', + status=shared.JournalStatus.ARCHIVED, + type='est', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=56059, + timeout_in_minutes=716024, ) res = s.journals.create(req) @@ -91,7 +91,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -101,7 +101,7 @@ s = codataccounting.CodatAccounting( req = operations.GetJournalRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - journal_id='totam', + journal_id='fugiat', ) res = s.journals.get(req) @@ -140,7 +140,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -185,7 +185,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -198,7 +198,7 @@ req = operations.ListJournalsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='aliquid', + query='nulla', ) res = s.journals.list(req) diff --git a/previous-versions/accounting/docs/sdks/paymentmethods/README.md b/previous-versions/accounting/docs/sdks/paymentmethods/README.md index f411a17d7..15952d2a2 100755 --- a/previous-versions/accounting/docs/sdks/paymentmethods/README.md +++ b/previous-versions/accounting/docs/sdks/paymentmethods/README.md @@ -24,7 +24,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -34,7 +34,7 @@ s = codataccounting.CodatAccounting( req = operations.GetPaymentMethodRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - payment_method_id='dignissimos', + payment_method_id='totam', ) res = s.payment_methods.get(req) @@ -69,7 +69,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -82,7 +82,7 @@ req = operations.ListPaymentMethodsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='exercitationem', + query='praesentium', ) res = s.payment_methods.list(req) diff --git a/previous-versions/accounting/docs/sdks/payments/README.md b/previous-versions/accounting/docs/sdks/payments/README.md index d68902e5a..c69356911 100755 --- a/previous-versions/accounting/docs/sdks/payments/README.md +++ b/previous-versions/accounting/docs/sdks/payments/README.md @@ -29,6 +29,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -39,69 +40,27 @@ s = codataccounting.CodatAccounting( req = operations.CreatePaymentRequest( payment=shared.Payment( account_ref=shared.AccountRef( - id='cbf18685-6a7e-482c-9f9d-0fc282c666af', - name='Jacquelyn Dicki', + id='e71f6c48-252d-4777-9e7f-d074009ef8d2', + name='Dr. Levi Volkman', ), currency='USD', - currency_rate=5194.41, - customer_ref=shared.CustomerRef( + currency_rate=Decimal('161.58'), + customer_ref=shared.AccountingCustomerRef( company_name='provident', - id='bea5d264-e41e-42ca-8482-2e513f6d9d2a', + id='7b5da08c-57fa-46c7-8a21-6e19bafeca61', ), date_='2022-10-23T00:00:00.000Z', - id='37c30990-77c1-40b6-8792-163e67d48860', + id='1498140b-64ff-48ae-970e-f03b5f37e4aa', lines=[ shared.PaymentLine( allocated_on_date='2022-10-23T00:00:00.000Z', - amount=2316.11, + amount=Decimal('3819.74'), links=[ shared.PaymentLineLink( - amount=470, - currency_rate=6419.14, - id='3049c3cf-6c02-476e-bb21-bad90d2743fd', - type=shared.PaymentLinkType.OTHER, - ), - shared.PaymentLineLink( - amount=7649.53, - currency_rate=1702.52, - id='a10e6c29-78ec-4256-a5b0-9227fcc47996', - type=shared.PaymentLinkType.PAYMENT_ON_ACCOUNT, - ), - shared.PaymentLineLink( - amount=5744.03, - currency_rate=4585.85, - id='7bbc57f3-8928-4a86-80c5-8d67d63e4aa5', - type=shared.PaymentLinkType.CREDIT_NOTE, - ), - shared.PaymentLineLink( - amount=5547.96, - currency_rate=3030.69, - id='64579cfc-6c0e-4503-b568-31f1d8ed87b2', - type=shared.PaymentLinkType.REFUND, - ), - ], - ), - shared.PaymentLine( - allocated_on_date='2022-10-23T00:00:00.000Z', - amount=5394.5, - links=[ - shared.PaymentLineLink( - amount=9515.01, - currency_rate=6325.21, - id='bc986e24-1e43-4b23-8241-7d13e3f62aa9', - type=shared.PaymentLinkType.PAYMENT, - ), - shared.PaymentLineLink( - amount=9236.58, - currency_rate=2889.02, - id='ae8ab4a9-c492-4c5e-8ba5-d4aa4a508bd3', - type=shared.PaymentLinkType.REFUND, - ), - shared.PaymentLineLink( - amount=544.9, - currency_rate=7608.41, - id='29aa8dd7-1bdd-4aa3-8b7b-91449ae69c08', - type=shared.PaymentLinkType.REFUND, + amount=Decimal('5576.51'), + currency_rate=Decimal('3385.42'), + id='55966732-aa5d-4cb6-a82c-b70f8cfd5fb6', + type=shared.PaymentLinkType.DISCOUNT, ), ], ), @@ -110,40 +69,22 @@ req = operations.CreatePaymentRequest( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='labore', - payment_method_ref=shared.PaymentMethodRef( - id='18bb7180-4f42-43d5-8393-5f377ac5c9b7', - name='Joey Frami', - ), - reference='id', + note='dicta', + payment_method_ref='quidem', + reference='omnis', source_modified_date='2022-10-23T00:00:00.000Z', supplemental_data=shared.SupplementalData( content={ - "minima": { - "amet": 'quasi', - }, - "doloremque": { - "recusandae": 'iusto', - "impedit": 'dolor', - }, - "quaerat": { - "deserunt": 'distinctio', - "alias": 'voluptates', - "optio": 'libero', - "voluptatum": 'beatae', - }, - "explicabo": { - "laboriosam": 'ea', - "beatae": 'eius', - "atque": 'unde', + "molestias": { + "a": 'dignissimos', }, }, ), - total_amount=2811.64, + total_amount=Decimal('2883.48'), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=302190, + timeout_in_minutes=511054, ) res = s.payments.create(req) @@ -180,7 +121,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -190,7 +131,7 @@ s = codataccounting.CodatAccounting( req = operations.GetPaymentRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - payment_id='fuga', + payment_id='dolore', ) res = s.payments.get(req) @@ -229,7 +170,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -274,7 +215,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -287,7 +228,7 @@ req = operations.ListPaymentsRequest( order_by='-modifiedDate', page=1, page_size=100, - query='voluptatum', + query='aliquid', ) res = s.payments.list(req) diff --git a/previous-versions/accounting/docs/sdks/purchaseorders/README.md b/previous-versions/accounting/docs/sdks/purchaseorders/README.md index 272f1a088..5e9977e12 100755 --- a/previous-versions/accounting/docs/sdks/purchaseorders/README.md +++ b/previous-versions/accounting/docs/sdks/purchaseorders/README.md @@ -30,6 +30,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -40,91 +41,79 @@ s = codataccounting.CodatAccounting( req = operations.CreatePurchaseOrderRequest( purchase_order=shared.PurchaseOrder( currency='EUR', - currency_rate=5759.77, + currency_rate=Decimal('1356.92'), delivery_date='2022-10-23T00:00:00.000Z', expected_delivery_date='2022-10-23T00:00:00.000Z', - id='5075bc25-3825-4334-bfb0-a4e66ea47578', + id='309db053-6d9e-475c-a006-f5392c11a25a', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.PurchaseOrderLineItem( account_ref=shared.AccountRef( - id='71e29418-18fc-4679-b6b2-f25359b855d0', - name='Cathy Powlowski', + id='bf92f974-28ad-49a9-b8bf-8221125359d9', + name='Glenn Lebsack', ), - description='eligendi', - discount_amount=5505.76, - discount_percentage=7374.84, + description='iusto', + discount_amount=Decimal('6339.56'), + discount_percentage=Decimal('4531.11'), item_ref=shared.ItemRef( - id='83a38a8a-88c1-4442-80c2-caeb1ae1ecf8', - name='Chad Gislason', + id='9cd72cd2-484d-4a21-b29f-2ac41ef5725f', + name='Jean Kemmer', ), - quantity=4159.24, - sub_total=6882.17, - tax_amount=6973.55, + quantity=Decimal('7500.75'), + sub_total=Decimal('944.87'), + tax_amount=Decimal('9313.93'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=6797.33, - id='7a05a8b4-a9ec-45b3-a88c-ca363272760e', - name='Chester Johnson', + effective_tax_rate=Decimal('3062.69'), + id='1d8a23c2-3e34-4f2d-ba4a-197f6de92215', + name='Ms. Dixie Turner Sr.', ), - total_amount=4684.82, + total_amount=Decimal('309.62'), tracking_category_refs=[ shared.TrackingCategoryRef( - id='05410334-7d78-4ff2-8911-45fab9e59a4a', - name='Nathan Fay', - ), - shared.TrackingCategoryRef( - id='64eaa6bf-2ff1-44e8-81b3-52accedacc52', - name='Mrs. Charlene Little', - ), - shared.TrackingCategoryRef( - id='ca016bc4-1ea1-4342-9410-4a25ef71de57', - name='Keith Bradtke', - ), - shared.TrackingCategoryRef( - id='14a43176-92ea-4486-b3d5-22b828a90306', - name='Mr. Michelle Zemlak', + id='99853e9f-543d-4854-839e-e224460443bc', + name='Ms. Lorraine Gusikowski', ), ], - unit_amount=7532.31, + unit_amount=Decimal('7911.29'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='sint', + note='asperiores', payment_due_date='2022-10-23T00:00:00.000Z', - purchase_order_number='ut', + purchase_order_number='vel', ship_to=shared.ShipTo( address=shared.Addressesitems( - city='Runteview', - country='French Guiana', - line1='eligendi', - line2='magni', - postal_code='16117-2556', - region='facere', - type=shared.AddressType.DELIVERY, + city='Madison', + country='Guyana', + line1='at', + line2='culpa', + postal_code='52186', + region='libero', + type=shared.AccountingAddressType.DELIVERY, ), contact=shared.ShipToContact( - email='Cathrine_Wisoky@yahoo.com', - name='Jon Heller', - phone='1-491-252-0038 x612', + email='Augustine.Kuhlman69@yahoo.com', + name='Miss Meredith Hand', + phone='790-276-8540 x482', ), ), source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.PurchaseOrderStatus.CLOSED, - sub_total=5615.97, + status=shared.PurchaseOrderStatus.UNKNOWN, + sub_total=Decimal('5142.34'), supplier_ref=shared.SupplierRef( - id='7d4f6212-7a60-47d1-a062-94514c3db9ca', - supplier_name='omnis', + id='2bfbdc41-ff5d-44e2-ae4f-b5cb35d17638', + supplier_name='delectus', ), - total_amount=9600.37, - total_discount=2360.34, - total_tax_amount=5514.18, + total_amount=Decimal('1230.16'), + total_discount=Decimal('9225.93'), + total_tax_amount=Decimal('8182.73'), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=694759, + timeout_in_minutes=716538, ) res = s.purchase_orders.create(req) @@ -161,7 +150,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -171,7 +160,7 @@ s = codataccounting.CodatAccounting( req = operations.GetPurchaseOrderRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - purchase_order_id='at', + purchase_order_id='ducimus', ) res = s.purchase_orders.get(req) @@ -210,7 +199,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -255,7 +244,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -268,7 +257,7 @@ req = operations.ListPurchaseOrdersRequest( order_by='-modifiedDate', page=1, page_size=100, - query='quia', + query='atque', ) res = s.purchase_orders.list(req) @@ -308,6 +297,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -317,152 +307,82 @@ s = codataccounting.CodatAccounting( req = operations.UpdatePurchaseOrderRequest( purchase_order=shared.PurchaseOrder( - currency='EUR', - currency_rate=8782.83, + currency='GBP', + currency_rate=Decimal('3670.96'), delivery_date='2022-10-23T00:00:00.000Z', expected_delivery_date='2022-10-23T00:00:00.000Z', - id='8703493f-49aa-4846-9a32-83279b719d1c', + id='cc5cb860-f8cd-4580-ba73-810e4fe44472', issue_date='2022-10-23T00:00:00.000Z', line_items=[ shared.PurchaseOrderLineItem( account_ref=shared.AccountRef( - id='673d86e3-b35e-449a-b135-778ce54cacb0', - name='Chris Terry', - ), - description='ducimus', - discount_amount=3264.82, - discount_percentage=276.36, - item_ref=shared.ItemRef( - id='45bacf63-b215-4186-ab5e-3a022614315d', - name='Bernice Jakubowski', - ), - quantity=5766.94, - sub_total=5813.68, - tax_amount=9207.5, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=3778.77, - id='1afc7186-ff20-4b7a-b3df-40ca0d7657c1', - name='Esther Bernier', - ), - total_amount=9823, - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='55271b25-11dd-4606-9d1b-28272bc9c322', - name='Tara Marquardt', - ), - ], - unit_amount=822.04, - ), - shared.PurchaseOrderLineItem( - account_ref=shared.AccountRef( - id='880fcbb2-b93c-415f-a70b-d1784831653e', - name='Kerry Farrell', - ), - description='vero', - discount_amount=1407.83, - discount_percentage=3102.85, - item_ref=shared.ItemRef( - id='1c310998-3663-4c66-9cbb-7df6cb09c8b4', - name='Ms. Irma Walter I', - ), - quantity=4775.18, - sub_total=4482.26, - tax_amount=2986.6, - tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=8337.81, - id='e4fee101-d978-40a1-8c47-b95040d6c8b2', - name='Mr. Roberto Wilkinson', - ), - total_amount=1526.43, - tracking_category_refs=[ - shared.TrackingCategoryRef( - id='7e4048f9-0009-4ed2-9027-8eb4ae9d6416', - name='Mrs. Delia Moore Jr.', - ), - ], - unit_amount=1887.19, - ), - shared.PurchaseOrderLineItem( - account_ref=shared.AccountRef( - id='23b2c09b-9247-471f-9669-e5b7ec762664', - name='Woodrow Littel', + id='7cd3b1dd-3bbc-4e24-bb76-84eff50126d7', + name='Vicky Wolf', ), - description='tempore', - discount_amount=5923.78, - discount_percentage=9275.83, + description='facere', + discount_amount=Decimal('113.92'), + discount_percentage=Decimal('9309.42'), item_ref=shared.ItemRef( - id='4cfd2276-e0b8-48fb-87d6-fa5b6e8dbf81', - name='Nettie Kuvalis', + id='b74b8421-953b-444b-93c4-3159d33e5953', + name='Mr. Michael Bashirian', ), - quantity=809.04, - sub_total=7530.97, - tax_amount=6568.11, + quantity=Decimal('5784.52'), + sub_total=Decimal('5525.12'), + tax_amount=Decimal('3971.12'), tax_rate_ref=shared.TaxRateRef( - effective_tax_rate=4189.32, - id='a9ffc561-929c-4ca9-960a-1395918da1d4', - name='Rolando Kovacek', + effective_tax_rate=Decimal('1930.48'), + id='aa41e6c3-1cc2-4f1f-8b51-c9a41ffbe9cb', + name='Brad Mraz', ), - total_amount=2178.8, + total_amount=Decimal('9358'), tracking_category_refs=[ shared.TrackingCategoryRef( - id='f8e1143d-a930-48b2-ba08-af22184439b3', - name='Rolando Lesch', - ), - shared.TrackingCategoryRef( - id='6ccce470-cd21-447b-ae61-52cf01d0d8c3', - name='Clifford Quigley', - ), - shared.TrackingCategoryRef( - id='5bf935df-e974-4fa4-b1e9-c097eda62344', - name='Alexis Braun', - ), - shared.TrackingCategoryRef( - id='237e9984-c80b-4479-a891-923c18ca8d69', - name='Jon Jacobs', + id='65e076cc-7abf-4616-aa5c-71641934b90f', + name='Rochelle Bailey', ), ], - unit_amount=1303.91, + unit_amount=Decimal('683'), ), ], metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - note='tempora', + note='possimus', payment_due_date='2022-10-23T00:00:00.000Z', - purchase_order_number='animi', + purchase_order_number='a', ship_to=shared.ShipTo( address=shared.Addressesitems( - city='North Caylatown', - country='Japan', - line1='officiis', - line2='eius', - postal_code='69025-7849', - region='ab', - type=shared.AddressType.DELIVERY, + city='Champlinworth', + country='Nepal', + line1='earum', + line2='fugit', + postal_code='10352-2752', + region='enim', + type=shared.AccountingAddressType.DELIVERY, ), contact=shared.ShipToContact( - email='Cicero_Schowalter67@hotmail.com', - name='Cody Zemlak', - phone='876-479-9089 x35968', + email='Dayana.Kilback@gmail.com', + name='Ms. Nettie McCullough', + phone='(836) 983-6977 x4324', ), ), source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.PurchaseOrderStatus.CLOSED, - sub_total=1625.48, + status=shared.PurchaseOrderStatus.VOID, + sub_total=Decimal('5678.21'), supplier_ref=shared.SupplierRef( - id='ee70be06-9fb3-46ad-9704-080e0a3fc73a', - supplier_name='ullam', + id='222c9ff5-7491-4aab-ba2e-761f0ca4d456', + supplier_name='vero', ), - total_amount=6283.94, - total_discount=465.74, - total_tax_amount=2391.23, + total_amount=Decimal('9708.48'), + total_discount=Decimal('1170.53'), + total_tax_amount=Decimal('234.1'), ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - purchase_order_id='aliquam', - timeout_in_minutes=744576, + purchase_order_id='adipisci', + timeout_in_minutes=80294, ) res = s.purchase_orders.update(req) diff --git a/previous-versions/accounting/docs/sdks/reports/README.md b/previous-versions/accounting/docs/sdks/reports/README.md index 5432041fc..d94f837d6 100755 --- a/previous-versions/accounting/docs/sdks/reports/README.md +++ b/previous-versions/accounting/docs/sdks/reports/README.md @@ -23,7 +23,7 @@ Returns aged creditors report for company that shows the total balance owed by a ```python import codataccounting import dateutil.parser -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -66,7 +66,7 @@ Returns aged debtors report for company that shows the total outstanding balance ```python import codataccounting import dateutil.parser -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -108,7 +108,7 @@ Gets the latest balance sheet for a company. ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -150,7 +150,7 @@ Gets the latest cash flow statement for a company. ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -192,7 +192,7 @@ Gets the latest profit and loss for a company. ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -234,7 +234,7 @@ Indicates whether the aged creditor report is available for the company. ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -273,7 +273,7 @@ Indicates whether the aged debtor report is available for the company. ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( diff --git a/previous-versions/accounting/docs/sdks/salesorders/README.md b/previous-versions/accounting/docs/sdks/salesorders/README.md index 0c1f09540..e10d448f7 100755 --- a/previous-versions/accounting/docs/sdks/salesorders/README.md +++ b/previous-versions/accounting/docs/sdks/salesorders/README.md @@ -24,7 +24,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -34,7 +34,7 @@ s = codataccounting.CodatAccounting( req = operations.GetSalesOrderRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - sales_order_id='sint', + sales_order_id='perspiciatis', ) res = s.sales_orders.get(req) @@ -69,7 +69,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -82,7 +82,7 @@ req = operations.ListSalesOrdersRequest( order_by='-modifiedDate', page=1, page_size=100, - query='sint', + query='omnis', ) res = s.sales_orders.list(req) diff --git a/previous-versions/accounting/docs/sdks/suppliers/README.md b/previous-versions/accounting/docs/sdks/suppliers/README.md index 2384c15d1..8a241d541 100755 --- a/previous-versions/accounting/docs/sdks/suppliers/README.md +++ b/previous-versions/accounting/docs/sdks/suppliers/README.md @@ -44,45 +44,40 @@ req = operations.CreateSupplierRequest( supplier=shared.Supplier( addresses=[ shared.Addressesitems( - city='East Lionel', - country='Wallis and Futuna', - line1='mollitia', - line2='suscipit', - postal_code='54624-1740', - region='iste', - type=shared.AddressType.DELIVERY, + city='Arvada', + country='Serbia', + line1='explicabo', + line2='accusantium', + postal_code='09117', + region='illum', + type=shared.AccountingAddressType.UNKNOWN, ), ], - contact_name='vitae', - default_currency='minima', - email_address='ipsum', - id='e2230106-8539-4ce0-932d-10acd15d8cc3', + contact_name='exercitationem', + default_currency='quod', + email_address='quod', + id='0584a184-d76d-4971-bc82-0c65b037bb8e', metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', - phone='(877) 492-8687', - registration_number='quidem', + phone='01224 658 999', + registration_number='impedit', source_modified_date='2022-10-23T00:00:00.000Z', status=shared.SupplierStatus.ACTIVE, supplemental_data=shared.SupplementalData( content={ - "libero": { - "at": 'amet', - }, - "ducimus": { - "fugiat": 'sed', - "aut": 'ut', - "similique": 'quae', + "ullam": { + "veritatis": 'quas', }, }, ), - supplier_name='doloribus', - tax_number='ipsum', + supplier_name='molestiae', + tax_number='officiis', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - timeout_in_minutes=293648, + timeout_in_minutes=287293, ) res = s.suppliers.create(req) @@ -117,7 +112,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -129,7 +124,7 @@ req = operations.DownloadSupplierAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - supplier_id='accusantium', + supplier_id='nulla', ) res = s.suppliers.download_attachment(req) @@ -166,7 +161,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -176,7 +171,7 @@ s = codataccounting.CodatAccounting( req = operations.GetSupplierRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - supplier_id='nam', + supplier_id='accusamus', ) res = s.suppliers.get(req) @@ -211,7 +206,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -223,7 +218,7 @@ req = operations.GetSupplierAttachmentRequest( attachment_id='8a210b68-6988-11ed-a1eb-0242ac120002', company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - supplier_id='rerum', + supplier_id='consequatur', ) res = s.suppliers.get_attachment(req) @@ -262,7 +257,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -307,7 +302,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -320,7 +315,7 @@ req = operations.ListSuppliersRequest( order_by='-modifiedDate', page=1, page_size=100, - query='dolor', + query='ut', ) res = s.suppliers.list(req) @@ -355,7 +350,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -366,7 +361,7 @@ s = codataccounting.CodatAccounting( req = operations.ListSupplierAttachmentsRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - supplier_id='ex', + supplier_id='laborum', ) res = s.suppliers.list_attachments(req) @@ -417,78 +412,42 @@ req = operations.UpdateSupplierRequest( supplier=shared.Supplier( addresses=[ shared.Addressesitems( - city='South Jeanette', - country='Palau', - line1='eius', - line2='praesentium', - postal_code='05722', - region='quam', - type=shared.AddressType.UNKNOWN, - ), - shared.Addressesitems( - city='Alexanderville', - country='Martinique', - line1='aliquam', - line2='deleniti', - postal_code='14770-2749', - region='possimus', - type=shared.AddressType.UNKNOWN, - ), - shared.Addressesitems( - city='West Solonboro', - country='Jordan', - line1='corrupti', - line2='iusto', - postal_code='65588', - region='in', - type=shared.AddressType.UNKNOWN, - ), - shared.Addressesitems( - city='Christiansenhaven', - country='Eritrea', - line1='est', - line2='repellat', - postal_code='03567', - region='magni', - type=shared.AddressType.DELIVERY, + city='Cathedral City', + country='Malta', + line1='maxime', + line2='ad', + postal_code='88624-6607', + region='voluptatibus', + type=shared.AccountingAddressType.DELIVERY, ), ], - contact_name='doloremque', - default_currency='sapiente', - email_address='sit', - id='f58c3b87-b470-440d-8d98-e9d82c5e306f', + contact_name='ea', + default_currency='facere', + email_address='corrupti', + id='28da0131-9112-4964-a645-c1d81f29042f', metadata=shared.Metadata( is_deleted=False, ), modified_date='2022-10-23T00:00:00.000Z', phone='(877) 492-8687', - registration_number='molestiae', + registration_number='iste', source_modified_date='2022-10-23T00:00:00.000Z', - status=shared.SupplierStatus.ARCHIVED, + status=shared.SupplierStatus.ACTIVE, supplemental_data=shared.SupplementalData( content={ - "quisquam": { - "voluptates": 'cum', - "consequatur": 'eos', - "totam": 'ea', - "pariatur": 'alias', - }, - "distinctio": { - "aliquam": 'adipisci', - "harum": 'veritatis', - "quas": 'id', - "expedita": 'ipsum', + "culpa": { + "reiciendis": 'a', }, }, ), - supplier_name='molestiae', - tax_number='corrupti', + supplier_name='consequatur', + tax_number='voluptates', ), company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', force_update=False, - supplier_id='sapiente', - timeout_in_minutes=161205, + supplier_id='dolorum', + timeout_in_minutes=148004, ) res = s.suppliers.update(req) diff --git a/previous-versions/accounting/docs/sdks/taxrates/README.md b/previous-versions/accounting/docs/sdks/taxrates/README.md index 18b434059..f3d4c6ba3 100755 --- a/previous-versions/accounting/docs/sdks/taxrates/README.md +++ b/previous-versions/accounting/docs/sdks/taxrates/README.md @@ -24,7 +24,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -34,7 +34,7 @@ s = codataccounting.CodatAccounting( req = operations.GetTaxRateRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - tax_rate_id='asperiores', + tax_rate_id='eos', ) res = s.tax_rates.get(req) @@ -69,7 +69,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -82,7 +82,7 @@ req = operations.ListTaxRatesRequest( order_by='-modifiedDate', page=1, page_size=100, - query='quisquam', + query='veritatis', ) res = s.tax_rates.list(req) diff --git a/previous-versions/accounting/docs/sdks/trackingcategories/README.md b/previous-versions/accounting/docs/sdks/trackingcategories/README.md index 263f58225..31f70d5f4 100755 --- a/previous-versions/accounting/docs/sdks/trackingcategories/README.md +++ b/previous-versions/accounting/docs/sdks/trackingcategories/README.md @@ -24,7 +24,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -34,7 +34,7 @@ s = codataccounting.CodatAccounting( req = operations.GetTrackingCategoryRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', - tracking_category_id='maiores', + tracking_category_id='vel', ) res = s.tracking_categories.get(req) @@ -69,7 +69,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -82,7 +82,7 @@ req = operations.ListTrackingCategoriesRequest( order_by='-modifiedDate', page=1, page_size=100, - query='maiores', + query='placeat', ) res = s.tracking_categories.list(req) diff --git a/previous-versions/accounting/docs/sdks/transfers/README.md b/previous-versions/accounting/docs/sdks/transfers/README.md index 09ad6028a..149fd955e 100755 --- a/previous-versions/accounting/docs/sdks/transfers/README.md +++ b/previous-versions/accounting/docs/sdks/transfers/README.md @@ -10,6 +10,7 @@ Transfers * [get](#get) - Get transfer * [get_create_model](#get_create_model) - Get create transfer model * [list](#list) - List transfers +* [upload_attachment](#upload_attachment) - Push invoice attachment ## create @@ -29,6 +30,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting from codataccounting.models import operations, shared +from decimal import Decimal s = codataccounting.CodatAccounting( security=shared.Security( @@ -39,38 +41,26 @@ s = codataccounting.CodatAccounting( req = operations.CreateTransferRequest( transfer=shared.Transfer( contact_ref=shared.TransferContactRef( - data_type='laudantium', - id='1ddf7e08-8f74-4ef5-8c92-16e8926313bb', + data_type='libero', + id='e071bc16-3e27-49a3-b084-da99257d04f4', ), date_='2022-10-23T00:00:00.000Z', deposited_record_refs=[ shared.InvoiceTo( - data_type='quo', - id='2c8d2701-096b-466a-96e3-e1d9d3b66033', - ), - shared.InvoiceTo( - data_type='quaerat', - id='a11aa1d5-d224-47de-9b3d-46170e768a96', - ), - shared.InvoiceTo( - data_type='nobis', - id='b3987883-98eb-4a1b-bf71-43356f6349a1', - ), - shared.InvoiceTo( - data_type='voluptas', - id='4249b211-ce46-4b95-9652-b158ca9142f0', + data_type='accountTransaction', + id='47a742d8-4496-4cbd-aecf-6b99bc63562e', ), ], - description='veniam', + description='tempore', from_=shared.TransferAccount( account_ref=shared.AccountRef( - id='2632b31c-ad69-42ff-8874-5005e9d3d934', - name='Kevin Franecki', + id='fdf55c29-4c06-40b0-aa12-87764eef6d0c', + name='Paulette Kassulke', ), - amount=3566.2, + amount=Decimal('5662.13'), currency='EUR', ), - id='388664f6-9855-430a-ae2a-ed6aaf863c28', + id='73dd6345-7150-49a8-a870-d3c5a1f9c242', metadata=shared.Metadata( is_deleted=False, ), @@ -78,30 +68,23 @@ req = operations.CreateTransferRequest( source_modified_date='2022-10-23T00:00:00.000Z', supplemental_data=shared.SupplementalData( content={ - "aut": { - "vel": 'perspiciatis', - "id": 'amet', - "pariatur": 'iste', - "voluptatem": 'voluptas', - }, - "hic": { - "officiis": 'soluta', - "at": 'nostrum', + "quidem": { + "iure": 'aliquid', }, }, ), to=shared.TransferAccount( account_ref=shared.AccountRef( - id='ad7ec739-4f25-4f63-8b37-30714e6be8c3', - name='Michael Mertz', + id='a1f30c73-df5b-4671-9890-f42a4bb438d8', + name='Kelli Davis II', ), - amount=3122.98, - currency='EUR', + amount=Decimal('5955.95'), + currency='GBP', ), tracking_category_refs=[ shared.TrackingCategoryRef( - id='42ac299a-6e5e-47ae-b134-02e945f53743', - name='Moses Schulist Jr.', + id='d745e3c2-059c-49c3-b567-e0e252765b1d', + name='Kathryn Windler', ), ], ), @@ -143,7 +126,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -154,7 +137,7 @@ s = codataccounting.CodatAccounting( req = operations.GetTransferRequest( company_id='8a210b68-6988-11ed-a1eb-0242ac120002', connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', - transfer_id='sint', + transfer_id='laborum', ) res = s.transfers.get(req) @@ -193,7 +176,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -238,7 +221,7 @@ Before using this endpoint, you must have [retrieved data for the company](https ```python import codataccounting -from codataccounting.models import operations +from codataccounting.models import operations, shared s = codataccounting.CodatAccounting( security=shared.Security( @@ -252,7 +235,7 @@ req = operations.ListTransfersRequest( order_by='-modifiedDate', page=1, page_size=100, - query='praesentium', + query='optio', ) res = s.transfers.list(req) @@ -273,3 +256,57 @@ if res.transfers is not None: **[operations.ListTransfersResponse](../../models/operations/listtransfersresponse.md)** + +## upload_attachment + +The *Upload transfer attachment* endpoint uploads an attachment and assigns it against a specific `transferId`. + +[Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) are issued by a supplier for the purpose of recording transfer. + +**Integration-specific behaviour** + +For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support uploading a transfer attachment. + + +### Example Usage + +```python +import codataccounting +from codataccounting.models import operations, shared + +s = codataccounting.CodatAccounting( + security=shared.Security( + auth_header="Basic BASE_64_ENCODED(API_KEY)", + ), +) + +req = operations.UploadTransferAttachmentRequest( + request_body=operations.UploadTransferAttachmentRequestBody( + content='debitis'.encode(), + request_body='architecto', + ), + company_id='8a210b68-6988-11ed-a1eb-0242ac120002', + connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', + transfer_id='reiciendis', +) + +res = s.transfers.upload_attachment(req) + +if res.status_code == 200: + # handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `request` | [operations.UploadTransferAttachmentRequest](../../models/operations/uploadtransferattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + + +### Response + +**[operations.UploadTransferAttachmentResponse](../../models/operations/uploadtransferattachmentresponse.md)** + diff --git a/previous-versions/accounting/files.gen b/previous-versions/accounting/files.gen index 790bf62bf..aabdb2cc1 100755 --- a/previous-versions/accounting/files.gen +++ b/previous-versions/accounting/files.gen @@ -29,6 +29,7 @@ pylintrc setup.py src/codataccounting/__init__.py src/codataccounting/models/__init__.py +src/codataccounting/models/errors/sdkerror.py src/codataccounting/utils/__init__.py src/codataccounting/utils/retries.py src/codataccounting/utils/utils.py @@ -51,6 +52,7 @@ src/codataccounting/models/operations/get_bill_credit_note.py src/codataccounting/models/operations/get_create_update_billcreditnotes_model.py src/codataccounting/models/operations/list_bill_credit_notes.py src/codataccounting/models/operations/update_bill_credit_note.py +src/codataccounting/models/operations/upload_billcreditnote_attachment.py src/codataccounting/models/operations/create_bill_payment.py src/codataccounting/models/operations/delete_billpayment.py src/codataccounting/models/operations/get_bill_payments.py @@ -157,8 +159,9 @@ src/codataccounting/models/operations/create_transfer.py src/codataccounting/models/operations/get_transfer.py src/codataccounting/models/operations/get_create_transfers_model.py src/codataccounting/models/operations/list_transfers.py +src/codataccounting/models/operations/upload_transfer_attachment.py src/codataccounting/models/operations/__init__.py -src/codataccounting/models/shared/schema.py +src/codataccounting/models/shared/errormessage.py src/codataccounting/models/shared/accounttransaction.py src/codataccounting/models/shared/metadata.py src/codataccounting/models/shared/accounttransactionline.py @@ -189,7 +192,6 @@ src/codataccounting/models/shared/accounts.py src/codataccounting/models/shared/createbanktransactionsresponse.py src/codataccounting/models/shared/createbanktransactions.py src/codataccounting/models/shared/createbankaccounttransaction.py -src/codataccounting/models/shared/banktransactionsresponse.py src/codataccounting/models/shared/banktransactions.py src/codataccounting/models/shared/banktransactiontype.py src/codataccounting/models/shared/createbankaccountresponse.py @@ -209,14 +211,13 @@ src/codataccounting/models/shared/billcreditnotelineitem.py src/codataccounting/models/shared/trackingcategoryref.py src/codataccounting/models/shared/projectref.py src/codataccounting/models/shared/billedtotype.py -src/codataccounting/models/shared/customerref.py +src/codataccounting/models/shared/accountingcustomerref.py src/codataccounting/models/shared/taxrateref.py src/codataccounting/models/shared/itemref.py src/codataccounting/models/shared/billcreditnotes.py src/codataccounting/models/shared/updatebillcreditnoteresponse.py src/codataccounting/models/shared/createbillpaymentresponse.py src/codataccounting/models/shared/billpayment.py -src/codataccounting/models/shared/paymentmethodref.py src/codataccounting/models/shared/billpaymentline.py src/codataccounting/models/shared/billpaymentlinelink.py src/codataccounting/models/shared/billpaymentlinelinktype.py @@ -234,7 +235,7 @@ src/codataccounting/models/shared/attachmentsdataset.py src/codataccounting/models/shared/updatebillresponse.py src/codataccounting/models/shared/companydataset.py src/codataccounting/models/shared/phonenumbertype.py -src/codataccounting/models/shared/addresstype.py +src/codataccounting/models/shared/accountingaddresstype.py src/codataccounting/models/shared/dataset.py src/codataccounting/models/shared/createcreditnoteresponse.py src/codataccounting/models/shared/creditnote.py @@ -305,6 +306,8 @@ src/codataccounting/models/shared/purchaseorders.py src/codataccounting/models/shared/updatepurchaseorderresponse.py src/codataccounting/models/shared/agedcreditorreport.py src/codataccounting/models/shared/agedcreditor.py +src/codataccounting/models/shared/agedoutstandingamount.py +src/codataccounting/models/shared/agedoutstandingamountdetail.py src/codataccounting/models/shared/ageddebtorreport.py src/codataccounting/models/shared/ageddebtor.py src/codataccounting/models/shared/agedcurrencyoutstandingitems.py @@ -341,6 +344,7 @@ src/codataccounting/models/shared/transferaccount.py src/codataccounting/models/shared/transfers.py src/codataccounting/models/shared/security.py src/codataccounting/models/shared/__init__.py +src/codataccounting/models/errors/__init__.py docs/sdks/codataccounting/README.md docs/models/utils/retryconfig.md docs/sdks/accounttransactions/README.md @@ -370,63 +374,55 @@ docs/sdks/trackingcategories/README.md docs/sdks/transfers/README.md USAGE.md docs/models/operations/getaccounttransactionrequest.md -docs/models/operations/getaccounttransaction409applicationjson.md docs/models/operations/getaccounttransactionresponse.md docs/models/operations/listaccounttransactionsrequest.md -docs/models/operations/listaccounttransactions409applicationjson.md docs/models/operations/listaccounttransactionsresponse.md docs/models/operations/createaccountrequest.md docs/models/operations/createaccountresponse.md docs/models/operations/getaccountrequest.md -docs/models/operations/getaccount409applicationjson.md docs/models/operations/getaccountresponse.md docs/models/operations/getcreatechartofaccountsmodelrequest.md docs/models/operations/getcreatechartofaccountsmodelresponse.md docs/models/operations/listaccountsrequest.md -docs/models/operations/listaccounts409applicationjson.md docs/models/operations/listaccountsresponse.md docs/models/operations/createbanktransactionsrequest.md docs/models/operations/createbanktransactionsresponse.md docs/models/operations/getcreatebanktransactionsmodelrequest.md docs/models/operations/getcreatebanktransactionsmodelresponse.md docs/models/operations/listbankaccounttransactionsrequest.md -docs/models/operations/listbankaccounttransactions409applicationjson.md docs/models/operations/listbankaccounttransactionsresponse.md docs/models/operations/createbankaccountrequest.md docs/models/operations/createbankaccountresponse.md docs/models/operations/getbankaccountrequest.md -docs/models/operations/getbankaccount409applicationjson.md docs/models/operations/getbankaccountresponse.md docs/models/operations/getcreateupdatebankaccountsmodelrequest.md docs/models/operations/getcreateupdatebankaccountsmodelresponse.md docs/models/operations/listbankaccountsrequest.md -docs/models/operations/listbankaccounts409applicationjson.md docs/models/operations/listbankaccountsresponse.md docs/models/operations/updatebankaccountrequest.md docs/models/operations/updatebankaccountresponse.md docs/models/operations/createbillcreditnoterequest.md docs/models/operations/createbillcreditnoteresponse.md docs/models/operations/getbillcreditnoterequest.md -docs/models/operations/getbillcreditnote409applicationjson.md docs/models/operations/getbillcreditnoteresponse.md docs/models/operations/getcreateupdatebillcreditnotesmodelrequest.md docs/models/operations/getcreateupdatebillcreditnotesmodelresponse.md docs/models/operations/listbillcreditnotesrequest.md -docs/models/operations/listbillcreditnotes409applicationjson.md docs/models/operations/listbillcreditnotesresponse.md docs/models/operations/updatebillcreditnoterequest.md docs/models/operations/updatebillcreditnoteresponse.md +docs/models/operations/uploadbillcreditnoteattachmentrequestbody.md +docs/models/operations/uploadbillcreditnoteattachmentrequest.md +docs/models/operations/uploadbillcreditnoteattachmentresponse.md docs/models/operations/createbillpaymentrequest.md docs/models/operations/createbillpaymentresponse.md docs/models/operations/deletebillpaymentrequest.md docs/models/operations/deletebillpaymentresponse.md docs/models/operations/getbillpaymentsrequest.md -docs/models/operations/getbillpayments409applicationjson.md docs/models/operations/getbillpaymentsresponse.md docs/models/operations/getcreatebillpaymentsmodelrequest.md docs/models/operations/getcreatebillpaymentsmodelresponse.md docs/models/operations/listbillpaymentsrequest.md -docs/models/operations/listbillpayments409applicationjson.md docs/models/operations/listbillpaymentsresponse.md docs/models/operations/createbillrequest.md docs/models/operations/createbillresponse.md @@ -435,14 +431,12 @@ docs/models/operations/deletebillresponse.md docs/models/operations/downloadbillattachmentrequest.md docs/models/operations/downloadbillattachmentresponse.md docs/models/operations/getbillrequest.md -docs/models/operations/getbill409applicationjson.md docs/models/operations/getbillresponse.md docs/models/operations/getbillattachmentrequest.md docs/models/operations/getbillattachmentresponse.md docs/models/operations/getcreateupdatebillsmodelrequest.md docs/models/operations/getcreateupdatebillsmodelresponse.md docs/models/operations/listbillsrequest.md -docs/models/operations/listbills409applicationjson.md docs/models/operations/listbillsresponse.md docs/models/operations/listbillattachmentsrequest.md docs/models/operations/listbillattachmentsresponse.md @@ -452,19 +446,16 @@ docs/models/operations/uploadbillattachmentrequestbody.md docs/models/operations/uploadbillattachmentrequest.md docs/models/operations/uploadbillattachmentresponse.md docs/models/operations/getcompanyinforequest.md -docs/models/operations/getcompanyinfo409applicationjson.md docs/models/operations/getcompanyinforesponse.md docs/models/operations/refreshcompanyinforequest.md docs/models/operations/refreshcompanyinforesponse.md docs/models/operations/createcreditnoterequest.md docs/models/operations/createcreditnoteresponse.md docs/models/operations/getcreditnoterequest.md -docs/models/operations/getcreditnote409applicationjson.md docs/models/operations/getcreditnoteresponse.md docs/models/operations/getcreateupdatecreditnotesmodelrequest.md docs/models/operations/getcreateupdatecreditnotesmodelresponse.md docs/models/operations/listcreditnotesrequest.md -docs/models/operations/listcreditnotes409applicationjson.md docs/models/operations/listcreditnotesresponse.md docs/models/operations/updatecreditnoterequest.md docs/models/operations/updatecreditnoteresponse.md @@ -473,14 +464,12 @@ docs/models/operations/createcustomerresponse.md docs/models/operations/downloadcustomerattachmentrequest.md docs/models/operations/downloadcustomerattachmentresponse.md docs/models/operations/getcustomerrequest.md -docs/models/operations/getcustomer409applicationjson.md docs/models/operations/getcustomerresponse.md docs/models/operations/getcustomerattachmentrequest.md docs/models/operations/getcustomerattachmentresponse.md docs/models/operations/getcreateupdatecustomersmodelrequest.md docs/models/operations/getcreateupdatecustomersmodelresponse.md docs/models/operations/listcustomersrequest.md -docs/models/operations/listcustomers409applicationjson.md docs/models/operations/listcustomersresponse.md docs/models/operations/listcustomerattachmentsrequest.md docs/models/operations/listcustomerattachmentsresponse.md @@ -491,14 +480,12 @@ docs/models/operations/createdirectcostresponse.md docs/models/operations/downloaddirectcostattachmentrequest.md docs/models/operations/downloaddirectcostattachmentresponse.md docs/models/operations/getdirectcostrequest.md -docs/models/operations/getdirectcost409applicationjson.md docs/models/operations/getdirectcostresponse.md docs/models/operations/getdirectcostattachmentrequest.md docs/models/operations/getdirectcostattachmentresponse.md docs/models/operations/getcreatedirectcostsmodelrequest.md docs/models/operations/getcreatedirectcostsmodelresponse.md docs/models/operations/listdirectcostsrequest.md -docs/models/operations/listdirectcosts409applicationjson.md docs/models/operations/listdirectcostsresponse.md docs/models/operations/listdirectcostattachmentsrequest.md docs/models/operations/listdirectcostattachmentsresponse.md @@ -510,14 +497,12 @@ docs/models/operations/createdirectincomeresponse.md docs/models/operations/downloaddirectincomeattachmentrequest.md docs/models/operations/downloaddirectincomeattachmentresponse.md docs/models/operations/getdirectincomerequest.md -docs/models/operations/getdirectincome409applicationjson.md docs/models/operations/getdirectincomeresponse.md docs/models/operations/getdirectincomeattachmentrequest.md docs/models/operations/getdirectincomeattachmentresponse.md docs/models/operations/getcreatedirectincomesmodelrequest.md docs/models/operations/getcreatedirectincomesmodelresponse.md docs/models/operations/listdirectincomesrequest.md -docs/models/operations/listdirectincomes409applicationjson.md docs/models/operations/listdirectincomesresponse.md docs/models/operations/listdirectincomeattachmentsrequest.md docs/models/operations/listdirectincomeattachmentsresponse.md @@ -533,14 +518,12 @@ docs/models/operations/downloadinvoiceattachmentresponse.md docs/models/operations/downloadinvoicepdfrequest.md docs/models/operations/downloadinvoicepdfresponse.md docs/models/operations/getinvoicerequest.md -docs/models/operations/getinvoice409applicationjson.md docs/models/operations/getinvoiceresponse.md docs/models/operations/getinvoiceattachmentrequest.md docs/models/operations/getinvoiceattachmentresponse.md docs/models/operations/getcreateupdateinvoicesmodelrequest.md docs/models/operations/getcreateupdateinvoicesmodelresponse.md docs/models/operations/listinvoicesrequest.md -docs/models/operations/listinvoices409applicationjson.md docs/models/operations/listinvoicesresponse.md docs/models/operations/listinvoiceattachmentsrequest.md docs/models/operations/listinvoiceattachmentsresponse.md @@ -552,60 +535,48 @@ docs/models/operations/uploadinvoiceattachmentresponse.md docs/models/operations/createitemrequest.md docs/models/operations/createitemresponse.md docs/models/operations/getitemrequest.md -docs/models/operations/getitem409applicationjson.md docs/models/operations/getitemresponse.md docs/models/operations/getcreateitemsmodelrequest.md docs/models/operations/getcreateitemsmodelresponse.md docs/models/operations/listitemsrequest.md -docs/models/operations/listitems409applicationjson.md docs/models/operations/listitemsresponse.md docs/models/operations/createjournalentryrequest.md docs/models/operations/createjournalentryresponse.md docs/models/operations/deletejournalentryrequest.md docs/models/operations/deletejournalentryresponse.md docs/models/operations/getjournalentryrequest.md -docs/models/operations/getjournalentry409applicationjson.md docs/models/operations/getjournalentryresponse.md docs/models/operations/getcreatejournalentriesmodelrequest.md docs/models/operations/getcreatejournalentriesmodelresponse.md docs/models/operations/listjournalentriesrequest.md -docs/models/operations/listjournalentries409applicationjson.md docs/models/operations/listjournalentriesresponse.md docs/models/operations/createjournalrequest.md docs/models/operations/createjournalresponse.md docs/models/operations/getjournalrequest.md -docs/models/operations/getjournal409applicationjson.md docs/models/operations/getjournalresponse.md docs/models/operations/getcreatejournalsmodelrequest.md docs/models/operations/getcreatejournalsmodelresponse.md docs/models/operations/listjournalsrequest.md -docs/models/operations/listjournals409applicationjson.md docs/models/operations/listjournalsresponse.md docs/models/operations/getpaymentmethodrequest.md -docs/models/operations/getpaymentmethod409applicationjson.md docs/models/operations/getpaymentmethodresponse.md docs/models/operations/listpaymentmethodsrequest.md -docs/models/operations/listpaymentmethods409applicationjson.md docs/models/operations/listpaymentmethodsresponse.md docs/models/operations/createpaymentrequest.md docs/models/operations/createpaymentresponse.md docs/models/operations/getpaymentrequest.md -docs/models/operations/getpayment409applicationjson.md docs/models/operations/getpaymentresponse.md docs/models/operations/getcreatepaymentsmodelrequest.md docs/models/operations/getcreatepaymentsmodelresponse.md docs/models/operations/listpaymentsrequest.md -docs/models/operations/listpayments409applicationjson.md docs/models/operations/listpaymentsresponse.md docs/models/operations/createpurchaseorderrequest.md docs/models/operations/createpurchaseorderresponse.md docs/models/operations/getpurchaseorderrequest.md -docs/models/operations/getpurchaseorder409applicationjson.md docs/models/operations/getpurchaseorderresponse.md docs/models/operations/getcreateupdatepurchaseordersmodelrequest.md docs/models/operations/getcreateupdatepurchaseordersmodelresponse.md docs/models/operations/listpurchaseordersrequest.md -docs/models/operations/listpurchaseorders409applicationjson.md docs/models/operations/listpurchaseordersresponse.md docs/models/operations/updatepurchaseorderrequest.md docs/models/operations/updatepurchaseorderresponse.md @@ -614,65 +585,55 @@ docs/models/operations/getagedcreditorsreportresponse.md docs/models/operations/getageddebtorsreportrequest.md docs/models/operations/getageddebtorsreportresponse.md docs/models/operations/getbalancesheetrequest.md -docs/models/operations/getbalancesheet409applicationjson.md docs/models/operations/getbalancesheetresponse.md docs/models/operations/getcashflowstatementrequest.md -docs/models/operations/getcashflowstatement409applicationjson.md docs/models/operations/getcashflowstatementresponse.md docs/models/operations/getprofitandlossrequest.md -docs/models/operations/getprofitandloss409applicationjson.md docs/models/operations/getprofitandlossresponse.md docs/models/operations/isagedcreditorsreportavailablerequest.md docs/models/operations/isagedcreditorsreportavailableresponse.md docs/models/operations/isageddebtorreportavailablerequest.md docs/models/operations/isageddebtorreportavailableresponse.md docs/models/operations/getsalesorderrequest.md -docs/models/operations/getsalesorder409applicationjson.md docs/models/operations/getsalesorderresponse.md docs/models/operations/listsalesordersrequest.md -docs/models/operations/listsalesorders409applicationjson.md docs/models/operations/listsalesordersresponse.md docs/models/operations/createsupplierrequest.md docs/models/operations/createsupplierresponse.md docs/models/operations/downloadsupplierattachmentrequest.md docs/models/operations/downloadsupplierattachmentresponse.md docs/models/operations/getsupplierrequest.md -docs/models/operations/getsupplier409applicationjson.md docs/models/operations/getsupplierresponse.md docs/models/operations/getsupplierattachmentrequest.md docs/models/operations/getsupplierattachmentresponse.md docs/models/operations/getcreateupdatesuppliersmodelrequest.md docs/models/operations/getcreateupdatesuppliersmodelresponse.md docs/models/operations/listsuppliersrequest.md -docs/models/operations/listsuppliers409applicationjson.md docs/models/operations/listsuppliersresponse.md docs/models/operations/listsupplierattachmentsrequest.md docs/models/operations/listsupplierattachmentsresponse.md docs/models/operations/updatesupplierrequest.md docs/models/operations/updatesupplierresponse.md docs/models/operations/gettaxraterequest.md -docs/models/operations/gettaxrate409applicationjson.md docs/models/operations/gettaxrateresponse.md docs/models/operations/listtaxratesrequest.md -docs/models/operations/listtaxrates409applicationjson.md docs/models/operations/listtaxratesresponse.md docs/models/operations/gettrackingcategoryrequest.md -docs/models/operations/gettrackingcategory409applicationjson.md docs/models/operations/gettrackingcategoryresponse.md docs/models/operations/listtrackingcategoriesrequest.md -docs/models/operations/listtrackingcategories409applicationjson.md docs/models/operations/listtrackingcategoriesresponse.md docs/models/operations/createtransferrequest.md docs/models/operations/createtransferresponse.md docs/models/operations/gettransferrequest.md -docs/models/operations/gettransfer409applicationjson.md docs/models/operations/gettransferresponse.md docs/models/operations/getcreatetransfersmodelrequest.md docs/models/operations/getcreatetransfersmodelresponse.md docs/models/operations/listtransfersrequest.md -docs/models/operations/listtransfers409applicationjson.md docs/models/operations/listtransfersresponse.md -docs/models/shared/schema.md +docs/models/operations/uploadtransferattachmentrequestbody.md +docs/models/operations/uploadtransferattachmentrequest.md +docs/models/operations/uploadtransferattachmentresponse.md +docs/models/shared/errormessage.md docs/models/shared/accounttransactionstatus.md docs/models/shared/accounttransaction.md docs/models/shared/metadata.md @@ -704,7 +665,7 @@ docs/models/shared/accounts.md docs/models/shared/createbanktransactionsresponse.md docs/models/shared/createbanktransactions.md docs/models/shared/createbankaccounttransaction.md -docs/models/shared/banktransactionsresponse.md +docs/models/shared/banktransactionssourcemodifieddate.md docs/models/shared/banktransactions.md docs/models/shared/banktransactiontype.md docs/models/shared/createbankaccountresponse.md @@ -727,14 +688,13 @@ docs/models/shared/billcreditnotelineitem.md docs/models/shared/trackingcategoryref.md docs/models/shared/projectref.md docs/models/shared/billedtotype.md -docs/models/shared/customerref.md +docs/models/shared/accountingcustomerref.md docs/models/shared/taxrateref.md docs/models/shared/itemref.md docs/models/shared/billcreditnotes.md docs/models/shared/updatebillcreditnoteresponse.md docs/models/shared/createbillpaymentresponse.md docs/models/shared/billpayment.md -docs/models/shared/paymentmethodref.md docs/models/shared/billpaymentline.md docs/models/shared/billpaymentlinelink.md docs/models/shared/billpaymentlinelinktype.md @@ -754,13 +714,13 @@ docs/models/shared/attachment.md docs/models/shared/bills.md docs/models/shared/attachmentsdataset.md docs/models/shared/updatebillresponse.md -docs/models/shared/companydatasetaddresses.md +docs/models/shared/companydatasetaccountingaddress.md docs/models/shared/companydatasetphone.md docs/models/shared/companydatasetweblinktype.md docs/models/shared/companydatasetweblink.md docs/models/shared/companydataset.md docs/models/shared/phonenumbertype.md -docs/models/shared/addresstype.md +docs/models/shared/accountingaddresstype.md docs/models/shared/datasetstatus.md docs/models/shared/dataset.md docs/models/shared/createcreditnoteresponse.md @@ -834,14 +794,12 @@ docs/models/shared/purchaseorderlineitem.md docs/models/shared/purchaseorders.md docs/models/shared/updatepurchaseorderresponse.md docs/models/shared/agedcreditorreport.md -docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamountamountsoutstandingbydatatype.md -docs/models/shared/agedcreditoragedcurrencyoutstandingagedoutstandingamount.md docs/models/shared/agedcreditoragedcurrencyoutstanding.md docs/models/shared/agedcreditor.md +docs/models/shared/agedoutstandingamount.md +docs/models/shared/agedoutstandingamountdetail.md docs/models/shared/ageddebtorreport.md docs/models/shared/ageddebtor.md -docs/models/shared/itemsagedoutstandingamountamountsoutstandingbydatatype.md -docs/models/shared/itemsagedoutstandingamount.md docs/models/shared/agedcurrencyoutstandingitems.md docs/models/shared/balancesheet1.md docs/models/shared/balancesheet.md @@ -878,4 +836,5 @@ docs/models/shared/transfercontactref.md docs/models/shared/transfer.md docs/models/shared/transferaccount.md docs/models/shared/transfers.md -docs/models/shared/security.md \ No newline at end of file +docs/models/shared/security.md +.gitattributes \ No newline at end of file diff --git a/previous-versions/accounting/gen.yaml b/previous-versions/accounting/gen.yaml index 5f542bf90..eda293194 100644 --- a/previous-versions/accounting/gen.yaml +++ b/previous-versions/accounting/gen.yaml @@ -1,15 +1,24 @@ configVersion: 1.0.0 management: - docChecksum: '00000000000000000000000000000000' - docVersion: 2.1.0 - speakeasyVersion: 1.53.0 - generationVersion: 2.58.0 + docChecksum: bf07ea520f122be20c6440be5e0dcce6 + docVersion: 3.0.0 + speakeasyVersion: 1.82.5 + generationVersion: 2.108.3 generation: sdkClassName: CodatAccounting singleTagPerOp: false telemetryEnabled: true +features: + python: + core: 2.85.4 + deprecations: 2.81.1 + examples: 2.81.2 + globalSecurity: 2.81.1 + globalServerURLs: 2.82.0 + nameOverrides: 2.81.1 + retries: 2.82.0 python: - version: 0.0.0 + version: 0.1.0 author: Codat description: Access standardized accounting data from our accounting integrations. maxMethodParams: 0 diff --git a/previous-versions/accounting/pylintrc b/previous-versions/accounting/pylintrc index 144be1ca7..409631707 100755 --- a/previous-versions/accounting/pylintrc +++ b/previous-versions/accounting/pylintrc @@ -439,7 +439,9 @@ disable=raw-checker-failed, using-constant-test, too-many-statements, cyclic-import, - too-many-nested-blocks + too-many-nested-blocks, + too-many-boolean-expressions, + no-else-raise # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -620,7 +622,7 @@ additional-builtins= allow-global-unused-variables=yes # List of names allowed to shadow builtins -allowed-redefined-builtins= +allowed-redefined-builtins=id,object # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. diff --git a/previous-versions/accounting/setup.py b/previous-versions/accounting/setup.py index 517e38e75..f7a66dd33 100755 --- a/previous-versions/accounting/setup.py +++ b/previous-versions/accounting/setup.py @@ -10,16 +10,16 @@ setuptools.setup( name="codat-accounting", - version="0.28.1", - author="Speakeasy", - description="Python Client SDK Generated by Speakeasy", + version="0.1.0", + author="Codat", + description="Access standardized accounting data from our accounting integrations.", long_description=long_description, long_description_content_type="text/markdown", packages=setuptools.find_packages(where="src"), install_requires=[ "certifi>=2022.12.7", "charset-normalizer>=2.1.1", - "dataclasses-json-speakeasy>=0.5.8", + "dataclasses-json>=0.5.12", "idna>=3.3", "jsonpath-python>=1.0.6 ", "marshmallow>=3.17.1", diff --git a/previous-versions/accounting/src/codataccounting/account_transactions.py b/previous-versions/accounting/src/codataccounting/account_transactions.py index 817309b94..6b433d93b 100755 --- a/previous-versions/accounting/src/codataccounting/account_transactions.py +++ b/previous-versions/accounting/src/codataccounting/account_transactions.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class AccountTransactions: @@ -16,25 +16,29 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def get(self, request: operations.GetAccountTransactionRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetAccountTransactionResponse: r"""Get account transaction The *Get account transaction* endpoint returns a single account transaction for a given accountTransactionId. - + [Account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction) represent bank activity within an accounting platform. All transactions that go through a bank account are recorded as account transactions. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=accountTransactions) for integrations that support getting a specific account transaction. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetAccountTransactionRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/accountTransactions/{accountTransactionId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -52,14 +56,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AccountTransaction]) res.account_transaction = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetAccountTransaction409ApplicationJSON]) - res.get_account_transaction_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -67,9 +71,9 @@ def do_request(): def list(self, request: operations.ListAccountTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListAccountTransactionsResponse: r"""List account transactions The *List account transactions* endpoint returns a list of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction) for a given company's connection. - + [Account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction) represent bank activity within an accounting platform. All transactions that go through a bank account are recorded as account transactions. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -77,14 +81,18 @@ def list(self, request: operations.ListAccountTransactionsRequest, retries: Opti url = utils.generate_url(operations.ListAccountTransactionsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/accountTransactions', request) headers = {} query_params = utils.get_query_params(operations.ListAccountTransactionsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -102,14 +110,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AccountTransactions]) res.account_transactions = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListAccountTransactions409ApplicationJSON]) - res.list_account_transactions_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/accounts.py b/previous-versions/accounting/src/codataccounting/accounts.py index 7c49a8b5a..8f9541403 100755 --- a/previous-versions/accounting/src/codataccounting/accounts.py +++ b/previous-versions/accounting/src/codataccounting/accounts.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class Accounts: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateAccountResponse: r"""Create account The *Create account* endpoint creates a new [account](https://docs.codat.io/accounting-api#/schemas/Account) for a given company's connection. - + [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateAccountRequest, retries: Optional[uti 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;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateAccountResponse]) res.create_account_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,25 +77,29 @@ def do_request(): def get(self, request: operations.GetAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetAccountResponse: r"""Get account The *Get account* endpoint returns a single account for a given accountId. - + [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support getting a specific account. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetAccountRequest, base_url, '/companies/{companyId}/data/accounts/{accountId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -105,14 +117,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Account]) res.account = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetAccount409ApplicationJSON]) - res.get_account_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -120,27 +132,31 @@ def do_request(): 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/accounting-api#/schemas/Account) for a given company and integration. - + [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateChartOfAccountsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -158,10 +174,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -169,9 +189,9 @@ def do_request(): def list(self, request: operations.ListAccountsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListAccountsResponse: r"""List accounts The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/accounting-api#/schemas/Account) for a given company's connection. - + [Accounts](https://docs.codat.io/accounting-api#/schemas/Account) are the categories a business uses to record accounting transactions. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -179,14 +199,18 @@ def list(self, request: operations.ListAccountsRequest, retries: Optional[utils. url = utils.generate_url(operations.ListAccountsRequest, base_url, '/companies/{companyId}/data/accounts', request) headers = {} query_params = utils.get_query_params(operations.ListAccountsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -204,14 +228,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Accounts]) res.accounts = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListAccounts409ApplicationJSON]) - res.list_accounts_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/bank_account_transactions.py b/previous-versions/accounting/src/codataccounting/bank_account_transactions.py index bb66c4e13..d2bcb09b2 100755 --- a/previous-versions/accounting/src/codataccounting/bank_account_transactions.py +++ b/previous-versions/accounting/src/codataccounting/bank_account_transactions.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class BankAccountTransactions: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateBankTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBankTransactionsResponse: r"""Create bank account transactions The *Create bank account transactions* endpoint creates new [bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) for a given company's connection. - + [Bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create bank transaction model](https://docs.codat.io/accounting-api#/operations/get-create-bankTransactions-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating a bank account transactions. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateBankTransactionsRequest, retries: Opt if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBankTransactionsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateBankTransactionsResponse]) res.create_bank_transactions_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,27 +77,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreateBankTransactionsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateBankTransactionsModelResponse: r"""Get create bank account transactions model The *Get create bank account transactions model* endpoint returns the expected data for the request payload when creating [bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) for a given company and integration. - + [Bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support creating an bank transaction. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateBankTransactionsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -107,10 +119,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -118,11 +134,11 @@ def do_request(): def list(self, request: operations.ListBankAccountTransactionsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBankAccountTransactionsResponse: r"""List bank account transactions The *List account bank transactions* endpoint returns a list of [bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) for a given company's connection. - + [Bank account transactions](https://docs.codat.io/accounting-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankTransactions) for integrations that support listing bank transactions. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -130,14 +146,18 @@ def list(self, request: operations.ListBankAccountTransactionsRequest, retries: url = utils.generate_url(operations.ListBankAccountTransactionsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}/bankTransactions', request) headers = {} query_params = utils.get_query_params(operations.ListBankAccountTransactionsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -153,16 +173,16 @@ def do_request(): if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.BankTransactionsResponse]) - res.bank_transactions_response = out - elif http_res.status_code in [400, 401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + out = utils.unmarshal_json(http_res.text, Optional[shared.BankTransactions]) + res.bank_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 [400, 401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListBankAccountTransactions409ApplicationJSON]) - res.list_bank_account_transactions_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/bank_accounts.py b/previous-versions/accounting/src/codataccounting/bank_accounts.py index af3580ff8..7d618f6bd 100755 --- a/previous-versions/accounting/src/codataccounting/bank_accounts.py +++ b/previous-versions/accounting/src/codataccounting/bank_accounts.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class BankAccounts: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateBankAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBankAccountResponse: r"""Create bank account The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/accounting-api#/schemas/BankAccount) for a given company's connection. - + [Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/accounting-api#/operations/get-create-update-bankAccounts-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateBankAccountRequest, retries: Optional if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBankAccountRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateBankAccountResponse]) res.create_bank_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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,25 +77,29 @@ def do_request(): def get(self, request: operations.GetBankAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBankAccountResponse: r"""Get bank account The *Get bank account* endpoint returns a single account for a given accountId. - + [Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support getting a specific bank account. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetBankAccountRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bankAccounts/{accountId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -105,14 +117,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.BankAccount]) res.bank_account = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetBankAccount409ApplicationJSON]) - res.get_bank_account_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -120,27 +132,31 @@ def do_request(): def get_create_update_model(self, request: operations.GetCreateUpdateBankAccountsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateBankAccountsModelResponse: r"""Get create/update bank account model The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/accounting-api#/schemas/BankAccount) for a given company and integration. - + [Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateUpdateBankAccountsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/bankAccounts', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -158,10 +174,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -169,9 +189,9 @@ def do_request(): def list(self, request: operations.ListBankAccountsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBankAccountsResponse: r"""List bank accounts The *List bank accounts* endpoint returns a list of [bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) for a given company's connection. - + [Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -179,14 +199,18 @@ def list(self, request: operations.ListBankAccountsRequest, retries: Optional[ut url = utils.generate_url(operations.ListBankAccountsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bankAccounts', request) headers = {} query_params = utils.get_query_params(operations.ListBankAccountsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -204,14 +228,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.BankAccounts]) res.bank_accounts = out - elif http_res.status_code in [400, 401, 404]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListBankAccounts409ApplicationJSON]) - res.list_bank_accounts_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -219,13 +243,13 @@ def do_request(): def update(self, request: operations.UpdateBankAccountRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateBankAccountResponse: r"""Update bank account The *Update bank account* endpoint updates an existing [bank account](https://docs.codat.io/accounting-api#/schemas/BankAccount) for a given company's connection. - + [Bank accounts](https://docs.codat.io/accounting-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/accounting-api#/operations/get-create-update-bankAccounts-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -236,14 +260,18 @@ def update(self, request: operations.UpdateBankAccountRequest, retries: Optional if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateBankAccountRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers) @@ -261,10 +289,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateBankAccountResponse]) res.update_bank_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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/bill_credit_notes.py b/previous-versions/accounting/src/codataccounting/bill_credit_notes.py index d8e2a1af6..def0a32b0 100755 --- a/previous-versions/accounting/src/codataccounting/bill_credit_notes.py +++ b/previous-versions/accounting/src/codataccounting/bill_credit_notes.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class BillCreditNotes: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateBillCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBillCreditNoteResponse: r"""Create bill credit note The *Create bill credit note* endpoint creates a new [bill credit note](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) for a given company's connection. - + [Bill credit notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-billCreditNotes-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateBillCreditNoteRequest, retries: Optio if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBillCreditNoteRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateBillCreditNoteResponse]) res.create_bill_credit_note_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,25 +77,29 @@ def do_request(): def get(self, request: operations.GetBillCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillCreditNoteResponse: r"""Get bill credit note The *Get bill credit note* endpoint returns a single bill credit note for a given billCreditNoteId. - + [Bill credit notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support getting a specific bill credit note. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetBillCreditNoteRequest, base_url, '/companies/{companyId}/data/billCreditNotes/{billCreditNoteId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -105,14 +117,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.BillCreditNote]) res.bill_credit_note = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetBillCreditNote409ApplicationJSON]) - res.get_bill_credit_note_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -120,27 +132,31 @@ def do_request(): def get_create_update_model(self, request: operations.GetCreateUpdateBillCreditNotesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateBillCreditNotesModelResponse: r"""Get create/update bill credit note model The *Get create/update bill credit note model* endpoint returns the expected data for the request payload when creating and updating a [bill credit note](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) for a given company and integration. - + [Bill credit notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating and updating a bill credit note. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateUpdateBillCreditNotesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/billCreditNotes', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -158,10 +174,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -169,9 +189,9 @@ def do_request(): def list(self, request: operations.ListBillCreditNotesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBillCreditNotesResponse: r"""List bill credit notes The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) for a given company's connection. - + [Bill credit notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -179,14 +199,18 @@ def list(self, request: operations.ListBillCreditNotesRequest, retries: Optional url = utils.generate_url(operations.ListBillCreditNotesRequest, base_url, '/companies/{companyId}/data/billCreditNotes', request) headers = {} query_params = utils.get_query_params(operations.ListBillCreditNotesRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -204,14 +228,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.BillCreditNotes]) res.bill_credit_notes = out - elif http_res.status_code in [400, 401, 404]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListBillCreditNotes409ApplicationJSON]) - res.list_bill_credit_notes_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -219,13 +243,13 @@ def do_request(): def update(self, request: operations.UpdateBillCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateBillCreditNoteResponse: r"""Update bill credit note The *Update bill credit note* endpoint updates an existing [bill credit note](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) for a given company's connection. - + [Bill credit notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-billCreditNotes-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -236,14 +260,18 @@ def update(self, request: operations.UpdateBillCreditNoteRequest, retries: Optio if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateBillCreditNoteRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers) @@ -261,10 +289,74 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateBillCreditNoteResponse]) res.update_bill_credit_note_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + + return res + + + def upload_attachment(self, request: operations.UploadBillCreditNoteAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadBillCreditNoteAttachmentResponse: + r"""Upload bill credit note attachment + --- + stoplight-id: c26f5b1b19168 + --- + + The *Upload bill credit note attachment* endpoint uploads an attachment and assigns it against a specific `billCreditNoteId`. + + [Bill Credit Notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + + **Integration-specific behaviour** + + For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). + + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support uploading a bill credit note attachment. + """ + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) + + url = utils.generate_url(operations.UploadBillCreditNoteAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/billCreditNotes/{billCreditNoteId}/attachment', request) + headers = {} + req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'multipart') + if req_content_type not in ('multipart/form-data', 'multipart/mixed'): + headers['content-type'] = req_content_type + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' + + client = self.sdk_configuration.security_client + + global_retry_config = self.sdk_configuration.retry_config + retry_config = retries + if retry_config is None: + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + + def do_request(): + return client.request('POST', url, data=data, files=form, headers=headers) + + http_res = utils.retry(do_request, utils.Retries(retry_config, [ + '408', + '429', + '5XX' + ])) + content_type = http_res.headers.get('Content-Type') + + res = operations.UploadBillCreditNoteAttachmentResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) + + if http_res.status_code == 200: + pass + elif http_res.status_code in [401, 404, 429]: + if utils.match_content_type(content_type, 'application/json'): + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/bill_payments.py b/previous-versions/accounting/src/codataccounting/bill_payments.py index 0d898e897..fc731a091 100755 --- a/previous-versions/accounting/src/codataccounting/bill_payments.py +++ b/previous-versions/accounting/src/codataccounting/bill_payments.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class BillPayments: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateBillPaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBillPaymentResponse: r"""Create bill payments The *Create bill payment* endpoint creates a new [bill payment](https://docs.codat.io/accounting-api#/schemas/BillPayment) for a given company's connection. - + [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create bill payment model](https://docs.codat.io/accounting-api#/operations/get-create-billPayments-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateBillPaymentRequest, retries: Optional if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBillPaymentRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateBillPaymentResponse]) res.create_bill_payment_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,28 +77,28 @@ def do_request(): def delete(self, request: operations.DeleteBillPaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteBillPaymentResponse: r"""Delete bill payment The *Delete bill payment* endpoint allows you to delete a specified bill payment from an accounting platform. - + [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. - + ### Process 1. Pass the `{billPaymentId}` to the *Delete bill payment* endpoint and store the `pushOperationKey` returned. 2. Check the status of the delete operation by checking the status of push operation either via 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). - + A `Success` status indicates that the bill payment object was deleted from the accounting platform. 3. (Optional) Check that the bill payment was deleted from the accounting platform. - + ### Effect on related objects Be aware that deleting a bill payment from an accounting platform might cause related objects to be modified. - + ## Integration specifics Integrations that support soft delete do not permanently delete the object in the accounting platform. - + | Integration | Soft Delete | Details | |-------------|-------------|-----------------------------------------------------------------------------------------------------| | Oracle NetSuite | No | See [here](/integrations/accounting/netsuite/how-deleting-bill-payments-works) to learn more. | - + > **Supported Integrations** > > This functionality is currently only supported for our QuickBooks Online abd Oracle NetSuite integrations. Check out our [public roadmap](https://portal.productboard.com/codat/7-public-product-roadmap/tabs/46-accounting-api) to see what we're building next, and to submit ideas for new features. @@ -99,14 +107,18 @@ def delete(self, request: operations.DeleteBillPaymentRequest, retries: Optional url = utils.generate_url(operations.DeleteBillPaymentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/billPayments/{billPaymentId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('DELETE', url, headers=headers) @@ -124,10 +136,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOperationSummary]) res.push_operation_summary = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -135,25 +151,29 @@ def do_request(): def get(self, request: operations.GetBillPaymentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillPaymentsResponse: r"""Get bill payment The *Get bill payment* endpoint returns a single bill payment for a given billPaymentId. - + [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support getting a specific bill payment. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetBillPaymentsRequest, base_url, '/companies/{companyId}/data/billPayments/{billPaymentId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -171,14 +191,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.BillPayment]) res.bill_payment = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetBillPayments409ApplicationJSON]) - res.get_bill_payments_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -186,27 +206,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreateBillPaymentsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateBillPaymentsModelResponse: r"""Get create bill payment model The *Get create bill payment model* endpoint returns the expected data for the request payload when creating a [bill payment](https://docs.codat.io/accounting-api#/schemas/BillPayment) for a given company and integration. - + [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating a bill payment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateBillPaymentsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/billPayments', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -224,10 +248,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -235,9 +263,9 @@ def do_request(): def list(self, request: operations.ListBillPaymentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBillPaymentsResponse: r"""List bill payments The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) for a given company's connection. - + [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -245,14 +273,18 @@ def list(self, request: operations.ListBillPaymentsRequest, retries: Optional[ut url = utils.generate_url(operations.ListBillPaymentsRequest, base_url, '/companies/{companyId}/data/billPayments', request) headers = {} query_params = utils.get_query_params(operations.ListBillPaymentsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -270,14 +302,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.BillPayments]) res.bill_payments = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListBillPayments409ApplicationJSON]) - res.list_bill_payments_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/bills.py b/previous-versions/accounting/src/codataccounting/bills.py index 0138f4f1d..925cfb795 100755 --- a/previous-versions/accounting/src/codataccounting/bills.py +++ b/previous-versions/accounting/src/codataccounting/bills.py @@ -2,9 +2,14 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared +from enum import Enum from typing import Optional +class DownloadAttachmentAcceptEnum(str, Enum): + APPLICATION_JSON = "application/json" + APPLICATION_OCTET_STREAM = "application/octet-stream" + class Bills: r"""Bills""" sdk_configuration: SDKConfiguration @@ -16,13 +21,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateBillResponse: r"""Create bill The *Create bill* endpoint creates a new [bill](https://docs.codat.io/accounting-api#/schemas/Bill) for a given company's connection. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/accounting-api#/operations/get-create-update-bills-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +38,18 @@ def create(self, request: operations.CreateBillRequest, retries: Optional[utils. if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateBillRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +67,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateBillResponse]) res.create_bill_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,30 +82,30 @@ def do_request(): def delete(self, request: operations.DeleteBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteBillResponse: r"""Delete bill The *Delete bill* endpoint allows you to delete a specified bill from an accounting platform. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are itemized records of goods received or services provided to the SMB. - + ### Process 1. Pass the `{billId}` to the *Delete bill* endpoint and store the `pushOperationKey` returned. 2. Check the status of the delete operation by checking the status of push operation either via 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). - + A `Success` status indicates that the bill object was deleted from the accounting platform. 3. (Optional) Check that the bill was deleted from the accounting platform. - + ### Effect on related objects - + Be aware that deleting a bill from an accounting platform might cause related objects to be modified. For example, if you delete a paid bill in QuickBooks Online, the bill is deleted but the bill payment against that bill is not. The bill payment is converted to a payment on account. - + ## Integration specifics Integrations that support soft delete do not permanently delete the object in the accounting platform. - + | Integration | Soft Delete | Details | |-------------|-------------|--------------------------------------------------------------------------------------------------------------| | QuickBooks Online | No | - | | Oracle NetSuite | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | - + > **Supported Integrations** > > This functionality is currently only supported for our QuickBooks Online abd Oracle NetSuite integrations. Check out our [public roadmap](https://portal.productboard.com/codat/7-public-product-roadmap/tabs/46-accounting-api) to see what we're building next, and to submit ideas for new features. @@ -101,14 +114,18 @@ def delete(self, request: operations.DeleteBillRequest, retries: Optional[utils. url = utils.generate_url(operations.DeleteBillRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/bills/{billId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('DELETE', url, headers=headers) @@ -126,34 +143,45 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOperationSummary]) res.push_operation_summary = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res - def download_attachment(self, request: operations.DownloadBillAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadBillAttachmentResponse: + def download_attachment(self, request: operations.DownloadBillAttachmentRequest, retries: Optional[utils.RetryConfig] = None, accept_header_override: Optional[DownloadAttachmentAcceptEnum] = None) -> operations.DownloadBillAttachmentResponse: r"""Download bill attachment The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support downloading a bill attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.DownloadBillAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}/download', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' + if accept_header_override is not None: + headers['Accept'] = accept_header_override.value + else: + headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -170,10 +198,14 @@ def do_request(): if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/octet-stream'): res.data = http_res.content + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -181,25 +213,29 @@ def do_request(): def get(self, request: operations.GetBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillResponse: r"""Get bill The *Get bill* endpoint returns a single bill for a given billId. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a specific bill. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetBillRequest, base_url, '/companies/{companyId}/data/bills/{billId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -217,14 +253,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Bill]) res.bill = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetBill409ApplicationJSON]) - res.get_bill_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -232,23 +268,27 @@ def do_request(): def get_attachment(self, request: operations.GetBillAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetBillAttachmentResponse: r"""Get bill attachment The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a bill attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetBillAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -266,10 +306,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Attachment]) 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 [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -277,27 +321,31 @@ def do_request(): def get_create_update_model(self, request: operations.GetCreateUpdateBillsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateBillsModelResponse: r"""Get create/update bill model The *Get create/update bill model* endpoint returns the expected data for the request payload when creating and updating a [bill](https://docs.codat.io/accounting-api#/schemas/Bill) for a given company and integration. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating and updating a bill. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateUpdateBillsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/bills', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -315,10 +363,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -326,9 +378,9 @@ def do_request(): def list(self, request: operations.ListBillsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBillsResponse: r"""List bills The *List bills* endpoint returns a list of [bills](https://docs.codat.io/accounting-api#/schemas/Bill) for a given company's connection. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -336,14 +388,18 @@ def list(self, request: operations.ListBillsRequest, retries: Optional[utils.Ret url = utils.generate_url(operations.ListBillsRequest, base_url, '/companies/{companyId}/data/bills', request) headers = {} query_params = utils.get_query_params(operations.ListBillsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -361,14 +417,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Bills]) res.bills = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListBills409ApplicationJSON]) - res.list_bills_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -376,23 +432,27 @@ def do_request(): def list_attachments(self, request: operations.ListBillAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListBillAttachmentsResponse: r"""List bill attachments The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support listing bill attachments. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.ListBillAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -410,10 +470,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AttachmentsDataset]) res.attachments_dataset = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -421,13 +485,13 @@ def do_request(): def update(self, request: operations.UpdateBillRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateBillResponse: r"""Update bill The *Update bill* endpoint updates an existing [bill](https://docs.codat.io/accounting-api#/schemas/Bill) for a given company's connection. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/accounting-api#/operations/get-create-update-bills-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -438,14 +502,18 @@ def update(self, request: operations.UpdateBillRequest, retries: Optional[utils. if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateBillRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers) @@ -463,10 +531,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateBillResponse]) res.update_bill_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -474,13 +546,13 @@ def do_request(): def upload_attachment(self, request: operations.UploadBillAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadBillAttachmentResponse: r"""Upload bill attachment The *Upload bill attachment* endpoint uploads an attachment and assigns it against a specific `billId`. - + [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + **Integration-specific behaviour** - + For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support uploading a bill attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -495,9 +567,13 @@ def upload_attachment(self, request: operations.UploadBillAttachmentRequest, ret client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, data=data, files=form, headers=headers) @@ -515,8 +591,10 @@ def do_request(): pass elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/company_info.py b/previous-versions/accounting/src/codataccounting/company_info.py index cf65e00c2..31b188327 100755 --- a/previous-versions/accounting/src/codataccounting/company_info.py +++ b/previous-versions/accounting/src/codataccounting/company_info.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class CompanyInfo: @@ -21,14 +21,18 @@ def get(self, request: operations.GetCompanyInfoRequest, retries: Optional[utils url = utils.generate_url(operations.GetCompanyInfoRequest, base_url, '/companies/{companyId}/data/info', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -46,14 +50,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CompanyDataset]) res.company_dataset = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetCompanyInfo409ApplicationJSON]) - res.get_company_info_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -66,14 +70,18 @@ def refresh(self, request: operations.RefreshCompanyInfoRequest, retries: Option url = utils.generate_url(operations.RefreshCompanyInfoRequest, base_url, '/companies/{companyId}/data/info', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, headers=headers) @@ -91,10 +99,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Dataset]) res.dataset = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/credit_notes.py b/previous-versions/accounting/src/codataccounting/credit_notes.py index 53e63ed24..ea572c7c9 100755 --- a/previous-versions/accounting/src/codataccounting/credit_notes.py +++ b/previous-versions/accounting/src/codataccounting/credit_notes.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class CreditNotes: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCreditNoteResponse: r"""Create credit note The *Create credit note* endpoint creates a new [credit note](https://docs.codat.io/accounting-api#/schemas/CreditNote) for a given company's connection. - + [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote) are issued to a customer to indicate debt, typically with reference to a previously issued invoice and/or purchase. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-creditNotes-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateCreditNoteRequest, retries: Optional[ if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateCreditNoteRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateCreditNoteResponse]) res.create_credit_note_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,25 +77,29 @@ def do_request(): def get(self, request: operations.GetCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreditNoteResponse: r"""Get credit note The *Get credit note* endpoint returns a single credit note for a given creditNoteId. - + [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote) are issued to a customer to indicate debt, typically with reference to a previously issued invoice and/or purchase. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support getting a specific credit note. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreditNoteRequest, base_url, '/companies/{companyId}/data/creditNotes/{creditNoteId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -105,14 +117,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreditNote]) res.credit_note = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetCreditNote409ApplicationJSON]) - res.get_credit_note_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -120,27 +132,31 @@ def do_request(): def get_create_update_model(self, request: operations.GetCreateUpdateCreditNotesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateCreditNotesModelResponse: r"""Get create/update credit note model The *Get create/update credit note model* endpoint returns the expected data for the request payload when creating and updating a [credit note](https://docs.codat.io/accounting-api#/schemas/CreditNote) for a given company and integration. - + [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote) are issued to a customer to indicate debt, typically with reference to a previously issued invoice and/or purchase. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating and updating a credit note. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateUpdateCreditNotesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/creditNotes', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -158,10 +174,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -169,9 +189,9 @@ def do_request(): def list(self, request: operations.ListCreditNotesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCreditNotesResponse: r"""List credit notes The *List credit notes* endpoint returns a list of [credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote) for a given company's connection. - + [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote) are issued to a customer to indicate debt, typically with reference to a previously issued invoice and/or purchase. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -179,14 +199,18 @@ def list(self, request: operations.ListCreditNotesRequest, retries: Optional[uti url = utils.generate_url(operations.ListCreditNotesRequest, base_url, '/companies/{companyId}/data/creditNotes', request) headers = {} query_params = utils.get_query_params(operations.ListCreditNotesRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -204,14 +228,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreditNotes]) res.credit_notes = out - elif http_res.status_code in [400, 401, 404]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListCreditNotes409ApplicationJSON]) - res.list_credit_notes_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -219,13 +243,13 @@ def do_request(): def update(self, request: operations.UpdateCreditNoteRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCreditNoteResponse: r"""Update creditNote The *Update credit note* endpoint updates an existing [credit note](https://docs.codat.io/accounting-api#/schemas/CreditNote) for a given company's connection. - + [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote) are issued to a customer to indicate debt, typically with reference to a previously issued invoice and/or purchase. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update credit note model](https://docs.codat.io/accounting-api#/operations/get-create-update-creditNotes-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=creditNotes) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -236,14 +260,18 @@ def update(self, request: operations.UpdateCreditNoteRequest, retries: Optional[ if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateCreditNoteRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers) @@ -261,10 +289,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateCreditNoteResponse]) res.update_credit_note_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/customers.py b/previous-versions/accounting/src/codataccounting/customers.py index cd1df1975..252d57ad6 100755 --- a/previous-versions/accounting/src/codataccounting/customers.py +++ b/previous-versions/accounting/src/codataccounting/customers.py @@ -2,9 +2,14 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared +from enum import Enum from typing import Optional +class DownloadAttachmentAcceptEnum(str, Enum): + APPLICATION_JSON = "application/json" + APPLICATION_OCTET_STREAM = "application/octet-stream" + class Customers: r"""Customers""" sdk_configuration: SDKConfiguration @@ -16,13 +21,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateCustomerResponse: r"""Create customer The *Create customer* endpoint creates a new [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection. - + [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +38,18 @@ def create(self, request: operations.CreateCustomerRequest, retries: Optional[ut 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;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,34 +67,45 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateCustomerResponse]) res.create_customer_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res - def download_attachment(self, request: operations.DownloadCustomerAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadCustomerAttachmentResponse: + def download_attachment(self, request: operations.DownloadCustomerAttachmentRequest, retries: Optional[utils.RetryConfig] = None, accept_header_override: Optional[DownloadAttachmentAcceptEnum] = None) -> operations.DownloadCustomerAttachmentResponse: r"""Download customer attachment The *Download customer attachment* endpoint downloads a specific attachment for a given `customerId` and `attachmentId`. - + [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support downloading a customer attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.DownloadCustomerAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments/{attachmentId}/download', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' + if accept_header_override is not None: + headers['Accept'] = accept_header_override.value + else: + headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -102,10 +122,14 @@ def do_request(): if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/octet-stream'): res.data = http_res.content + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -113,25 +137,29 @@ def do_request(): def get(self, request: operations.GetCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCustomerResponse: r"""Get customer The *Get customer* endpoint returns a single customer for a given customerId. - + [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support getting a specific customer. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCustomerRequest, base_url, '/companies/{companyId}/data/customers/{customerId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -149,14 +177,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Customer]) res.customer = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetCustomer409ApplicationJSON]) - res.get_customer_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -164,23 +192,27 @@ def do_request(): def get_attachment(self, request: operations.GetCustomerAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCustomerAttachmentResponse: r"""Get customer attachment The *Get customer attachment* endpoint returns a specific attachment for a given `customerId` and `attachmentId`. - + [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support getting a customer attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCustomerAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments/{attachmentId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -198,10 +230,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Attachment]) 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 [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -209,27 +245,31 @@ def do_request(): def get_create_update_model(self, request: operations.GetCreateUpdateCustomersModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateCustomersModelResponse: r"""Get create/update customer model The *Get create/update customer model* endpoint returns the expected data for the request payload when creating and updating a [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company and integration. - + [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating and updating a customer. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateUpdateCustomersModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/customers', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -247,10 +287,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -258,9 +302,9 @@ def do_request(): def list(self, request: operations.ListCustomersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCustomersResponse: r"""List customers The *List customers* endpoint returns a list of [customers](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection. - + [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -268,14 +312,18 @@ def list(self, request: operations.ListCustomersRequest, retries: Optional[utils url = utils.generate_url(operations.ListCustomersRequest, base_url, '/companies/{companyId}/data/customers', request) headers = {} query_params = utils.get_query_params(operations.ListCustomersRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -293,14 +341,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Customers]) res.customers = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListCustomers409ApplicationJSON]) - res.list_customers_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -308,23 +356,27 @@ def do_request(): def list_attachments(self, request: operations.ListCustomerAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListCustomerAttachmentsResponse: r"""List customer attachments The *List customer attachments* endpoint returns a list of attachments avialable to download for given `customerId`. - + [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support listing customer attachments. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.ListCustomerAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/customers/{customerId}/attachments', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -342,10 +394,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AttachmentsDataset]) res.attachments_dataset = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -353,13 +409,13 @@ def do_request(): def update(self, request: operations.UpdateCustomerRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateCustomerResponse: r"""Update customer The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection. - + [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -370,14 +426,18 @@ def update(self, request: operations.UpdateCustomerRequest, retries: Optional[ut 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;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers) @@ -395,10 +455,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateCustomerResponse]) res.update_customer_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/direct_costs.py b/previous-versions/accounting/src/codataccounting/direct_costs.py index 9c343fa10..03b32a3c8 100755 --- a/previous-versions/accounting/src/codataccounting/direct_costs.py +++ b/previous-versions/accounting/src/codataccounting/direct_costs.py @@ -2,9 +2,14 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared +from enum import Enum from typing import Optional +class DownloadAttachmentAcceptEnum(str, Enum): + APPLICATION_JSON = "application/json" + APPLICATION_OCTET_STREAM = "application/octet-stream" + class DirectCosts: r"""Direct costs""" sdk_configuration: SDKConfiguration @@ -16,13 +21,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateDirectCostRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateDirectCostResponse: r"""Create direct cost The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company's connection. - - [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. - + + [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are the expenses associated with a business' operations. For example, purchases of raw materials that are paid off at the point of the purchase and service fees are considered direct costs. + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/accounting-api#/operations/get-create-directCosts-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +38,18 @@ def create(self, request: operations.CreateDirectCostRequest, retries: Optional[ if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateDirectCostRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,34 +67,45 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateDirectCostResponse]) res.create_direct_cost_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res - def download_attachment(self, request: operations.DownloadDirectCostAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadDirectCostAttachmentResponse: + def download_attachment(self, request: operations.DownloadDirectCostAttachmentRequest, retries: Optional[utils.RetryConfig] = None, accept_header_override: Optional[DownloadAttachmentAcceptEnum] = None) -> operations.DownloadDirectCostAttachmentResponse: r"""Download direct cost attachment The *Download direct cost attachment* endpoint downloads a specific attachment for a given `directCostId` and `attachmentId`. - + [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support downloading a direct cost attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.DownloadDirectCostAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments/{attachmentId}/download', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' + if accept_header_override is not None: + headers['Accept'] = accept_header_override.value + else: + headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -102,10 +122,14 @@ def do_request(): if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/octet-stream'): res.data = http_res.content + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -113,25 +137,29 @@ def do_request(): def get(self, request: operations.GetDirectCostRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDirectCostResponse: r"""Get direct cost The *Get direct cost* endpoint returns a single direct cost for a given directCostId. - + [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support getting a specific direct cost. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetDirectCostRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -149,14 +177,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.DirectCost]) res.direct_cost = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetDirectCost409ApplicationJSON]) - res.get_direct_cost_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -164,23 +192,27 @@ def do_request(): def get_attachment(self, request: operations.GetDirectCostAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDirectCostAttachmentResponse: r"""Get direct cost attachment The *Get direct cost attachment* endpoint returns a specific attachment for a given `directCostId` and `attachmentId`. - + [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support getting a direct cost attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetDirectCostAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments/{attachmentId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -198,10 +230,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Attachment]) 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 [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -209,27 +245,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreateDirectCostsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateDirectCostsModelResponse: r"""Get create direct cost model The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company and integration. - + [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating a direct cost. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateDirectCostsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/directCosts', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -247,10 +287,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -258,9 +302,9 @@ def do_request(): def list(self, request: operations.ListDirectCostsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListDirectCostsResponse: r"""List direct costs The *List direct costs* endpoint returns a list of [direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company's connection. - + [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -268,14 +312,18 @@ def list(self, request: operations.ListDirectCostsRequest, retries: Optional[uti url = utils.generate_url(operations.ListDirectCostsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts', request) headers = {} query_params = utils.get_query_params(operations.ListDirectCostsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -293,14 +341,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.DirectCosts]) res.direct_costs = out - elif http_res.status_code in [400, 401, 404]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListDirectCosts409ApplicationJSON]) - res.list_direct_costs_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -308,23 +356,27 @@ def do_request(): def list_attachments(self, request: operations.ListDirectCostAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListDirectCostAttachmentsResponse: r"""List direct cost attachments The *List direct cost attachments* endpoint returns a list of attachments available to download for given `directCostId`. - + [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support listing direct cost attachments. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.ListDirectCostAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directCosts/{directCostId}/attachments', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -342,10 +394,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AttachmentsDataset]) res.attachments_dataset = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -353,13 +409,13 @@ def do_request(): def upload_attachment(self, request: operations.UploadDirectCostAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadDirectCostAttachmentResponse: r"""Upload direct cost attachment The *Upload direct cost attachment* endpoint uploads an attachment and assigns it against a specific `directCostId`. - + [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase. - + **Integration-specific behaviour** - + For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support uploading a direct cost attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -374,9 +430,13 @@ def upload_attachment(self, request: operations.UploadDirectCostAttachmentReques client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, data=data, files=form, headers=headers) @@ -394,8 +454,10 @@ def do_request(): pass elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/direct_incomes.py b/previous-versions/accounting/src/codataccounting/direct_incomes.py index 143c2d379..d2768d2ae 100755 --- a/previous-versions/accounting/src/codataccounting/direct_incomes.py +++ b/previous-versions/accounting/src/codataccounting/direct_incomes.py @@ -2,9 +2,14 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared +from enum import Enum from typing import Optional +class DownloadAttachmentAcceptEnum(str, Enum): + APPLICATION_JSON = "application/json" + APPLICATION_OCTET_STREAM = "application/octet-stream" + class DirectIncomes: r"""Direct incomes""" sdk_configuration: SDKConfiguration @@ -16,13 +21,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateDirectIncomeRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateDirectIncomeResponse: r"""Create direct income The *Create direct income* endpoint creates a new [direct income](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company's connection. - - [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. - + + [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes. + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create direct income model](https://docs.codat.io/accounting-api#/operations/get-create-directIncomes-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +38,18 @@ def create(self, request: operations.CreateDirectIncomeRequest, retries: Optiona if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateDirectIncomeRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,34 +67,45 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateDirectIncomeResponse]) res.create_direct_income_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res - def download_attachment(self, request: operations.DownloadDirectIncomeAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadDirectIncomeAttachmentResponse: + def download_attachment(self, request: operations.DownloadDirectIncomeAttachmentRequest, retries: Optional[utils.RetryConfig] = None, accept_header_override: Optional[DownloadAttachmentAcceptEnum] = None) -> operations.DownloadDirectIncomeAttachmentResponse: r"""Download direct income attachment The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`. - + [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support downloading a direct income attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.DownloadDirectIncomeAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}/download', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' + if accept_header_override is not None: + headers['Accept'] = accept_header_override.value + else: + headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -102,10 +122,14 @@ def do_request(): if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/octet-stream'): res.data = http_res.content + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -113,25 +137,29 @@ def do_request(): def get(self, request: operations.GetDirectIncomeRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDirectIncomeResponse: r"""Get direct income The *Get direct income* endpoint returns a single direct income for a given directIncomeId. - + [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support getting a specific direct income. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetDirectIncomeRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -149,14 +177,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.DirectIncome]) res.direct_income = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetDirectIncome409ApplicationJSON]) - res.get_direct_income_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -164,9 +192,9 @@ def do_request(): def get_attachment(self, request: operations.GetDirectIncomeAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetDirectIncomeAttachmentResponse: r"""Get direct income attachment The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`. - + [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support getting a direct income attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -174,14 +202,18 @@ def get_attachment(self, request: operations.GetDirectIncomeAttachmentRequest, r url = utils.generate_url(operations.GetDirectIncomeAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments/{attachmentId}', request) headers = {} query_params = utils.get_query_params(operations.GetDirectIncomeAttachmentRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -199,10 +231,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Attachment]) 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 [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -210,27 +246,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreateDirectIncomesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateDirectIncomesModelResponse: r"""Get create direct income model The *Get create direct income model* endpoint returns the expected data for the request payload when creating a [direct income](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company and integration. - + [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating a direct income. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateDirectIncomesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/directIncomes', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -248,10 +288,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -259,9 +303,9 @@ def do_request(): def list(self, request: operations.ListDirectIncomesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListDirectIncomesResponse: r"""List direct incomes The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company's connection. - + [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -269,14 +313,18 @@ def list(self, request: operations.ListDirectIncomesRequest, retries: Optional[u url = utils.generate_url(operations.ListDirectIncomesRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes', request) headers = {} query_params = utils.get_query_params(operations.ListDirectIncomesRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -294,14 +342,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.DirectIncomes]) res.direct_incomes = out - elif http_res.status_code in [400, 401, 404]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListDirectIncomes409ApplicationJSON]) - res.list_direct_incomes_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -309,23 +357,27 @@ def do_request(): def list_attachments(self, request: operations.ListDirectIncomeAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListDirectIncomeAttachmentsResponse: r"""List direct income attachments The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`. - + [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support listing direct income attachments. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.ListDirectIncomeAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/directIncomes/{directIncomeId}/attachments', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -343,10 +395,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AttachmentsDataset]) res.attachments_dataset = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -354,13 +410,13 @@ def do_request(): def upload_attachment(self, request: operations.UploadDirectIncomeAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadDirectIncomeAttachmentResponse: r"""Create direct income attachment The *Upload direct income attachment* endpoint uploads an attachment and assigns it against a specific `directIncomeId`. - + [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. - + **Integration-specific behaviour** - + For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support uploading a direct income attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -375,9 +431,13 @@ def upload_attachment(self, request: operations.UploadDirectIncomeAttachmentRequ client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, data=data, files=form, headers=headers) @@ -395,8 +455,10 @@ def do_request(): pass elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/invoices.py b/previous-versions/accounting/src/codataccounting/invoices.py index 37115e625..d65393758 100755 --- a/previous-versions/accounting/src/codataccounting/invoices.py +++ b/previous-versions/accounting/src/codataccounting/invoices.py @@ -2,9 +2,14 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared +from enum import Enum from typing import Optional +class DownloadAttachmentAcceptEnum(str, Enum): + APPLICATION_JSON = "application/json" + APPLICATION_OCTET_STREAM = "application/octet-stream" + class Invoices: r"""Invoices""" sdk_configuration: SDKConfiguration @@ -16,13 +21,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateInvoiceRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateInvoiceResponse: r"""Create invoice The *Create invoice* endpoint creates a new [invoice](https://docs.codat.io/accounting-api#/schemas/Invoice) for a given company's connection. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update invoice model](https://docs.codat.io/accounting-api#/operations/get-create-update-invoices-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +38,18 @@ def create(self, request: operations.CreateInvoiceRequest, retries: Optional[uti if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateInvoiceRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +67,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateInvoiceResponse]) res.create_invoice_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,29 +82,29 @@ def do_request(): def delete(self, request: operations.DeleteInvoiceRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DeleteInvoiceResponse: r"""Delete invoice The *Delete invoice* endpoint allows you to delete a specified invoice from an accounting platform. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + ### Process 1. Pass the `{invoiceId}` to the *Delete invoice* endpoint and store the `pushOperationKey` returned. 2. Check the status of the delete operation by checking the status of push operation either via 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). - + A `Success` status indicates that the invoice object was deleted from the accounting platform. 3. (Optional) Check that the invoice was deleted from the accounting platform. - + ### Effect on related objects - + Be aware that deleting an invoice from an accounting platform might cause related objects to be modified. For example, if you delete a paid invoice from QuickBooks Online, the invoice is deleted but the payment against that invoice is not. The payment is converted to a payment on account. - + ## Integration specifics Integrations that support soft delete do not permanently delete the object in the accounting platform. - + | Integration | Soft Deleted | |-------------|--------------| | QuickBooks Online | Yes | - + > **Supported Integrations** > > This functionality is currently only supported for our QuickBooks Online integration. Check out our [public roadmap](https://portal.productboard.com/codat/7-public-product-roadmap/tabs/46-accounting-api) to see what we're building next, and to submit ideas for new features. @@ -101,14 +114,18 @@ def delete(self, request: operations.DeleteInvoiceRequest, retries: Optional[uti url = utils.generate_url(operations.DeleteInvoiceRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/invoices/{invoiceId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('DELETE', url, headers=headers) @@ -126,34 +143,45 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOperationSummary]) res.push_operation_summary = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res - def download_attachment(self, request: operations.DownloadInvoiceAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadInvoiceAttachmentResponse: + def download_attachment(self, request: operations.DownloadInvoiceAttachmentRequest, retries: Optional[utils.RetryConfig] = None, accept_header_override: Optional[DownloadAttachmentAcceptEnum] = None) -> operations.DownloadInvoiceAttachmentResponse: r"""Download invoice attachment The *Download invoice attachment* endpoint downloads a specific attachment for a given `invoiceId` and `attachmentId`. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support downloading an invoice attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.DownloadInvoiceAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}/download', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' + if accept_header_override is not None: + headers['Accept'] = accept_header_override.value + else: + headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -170,10 +198,14 @@ def do_request(): if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/octet-stream'): res.data = http_res.content + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -191,9 +223,13 @@ def download_pdf(self, request: operations.DownloadInvoicePdfRequest, retries: O client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -210,6 +246,8 @@ def do_request(): if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/octet-stream'): res.data = http_res.content + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -217,25 +255,29 @@ def do_request(): def get(self, request: operations.GetInvoiceRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetInvoiceResponse: r"""Get invoice The *Get invoice* endpoint returns a single invoice for a given invoiceId. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support getting a specific invoice. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetInvoiceRequest, base_url, '/companies/{companyId}/data/invoices/{invoiceId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -253,14 +295,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Invoice]) res.invoice = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetInvoice409ApplicationJSON]) - res.get_invoice_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -268,23 +310,27 @@ def do_request(): def get_attachment(self, request: operations.GetInvoiceAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetInvoiceAttachmentResponse: r"""Get invoice attachment The *Get invoice attachment* endpoint returns a specific attachment for a given `invoiceId` and `attachmentId`. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support getting an invoice attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetInvoiceAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments/{attachmentId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -302,10 +348,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Attachment]) 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 [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -313,27 +363,31 @@ def do_request(): def get_create_update_model(self, request: operations.GetCreateUpdateInvoicesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateInvoicesModelResponse: r"""Get create/update invoice model The *Get create/update invoice model* endpoint returns the expected data for the request payload when creating and updating an [invoice](https://docs.codat.io/accounting-api#/schemas/Invoice) for a given company and integration. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support creating and updating an invoice. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateUpdateInvoicesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/invoices', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -351,10 +405,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -362,24 +420,35 @@ def do_request(): def list(self, request: operations.ListInvoicesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListInvoicesResponse: r"""List invoices The *List invoices* endpoint returns a list of [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) for a given company's connection. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). + + ### Useful queries + + - Outstanding invoices - `query = amountDue > 0` + - Invoices due after a certain date: `query = dueDate > 2021-01-28` + + [Read more about querying](https://docs.codat.io/using-the-api/querying). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.ListInvoicesRequest, base_url, '/companies/{companyId}/data/invoices', request) headers = {} query_params = utils.get_query_params(operations.ListInvoicesRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -397,14 +466,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Invoices]) res.invoices = out - elif http_res.status_code in [400, 401, 404]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListInvoices409ApplicationJSON]) - res.list_invoices_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -412,23 +481,27 @@ def do_request(): def list_attachments(self, request: operations.ListInvoiceAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListInvoiceAttachmentsResponse: r"""List invoice attachments The *List invoice attachments* endpoint returns a list of attachments available to download for given `invoiceId`. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support listing invoice attachments. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.ListInvoiceAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/invoices/{invoiceId}/attachments', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -446,10 +519,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AttachmentsDataset]) res.attachments_dataset = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -457,13 +534,13 @@ def do_request(): def update(self, request: operations.UpdateInvoiceRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateInvoiceResponse: r"""Update invoice The *Update invoice* endpoint updates an existing [invoice](https://docs.codat.io/accounting-api#/schemas/Invoice) for a given company's connection. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update invoice model](https://docs.codat.io/accounting-api#/operations/get-create-update-invoices-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -474,14 +551,18 @@ def update(self, request: operations.UpdateInvoiceRequest, retries: Optional[uti if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdateInvoiceRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers) @@ -499,10 +580,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateInvoiceResponse]) res.update_invoice_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -510,13 +595,13 @@ def do_request(): def upload_attachment(self, request: operations.UploadInvoiceAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadInvoiceAttachmentResponse: r"""Push invoice attachment The *Upload invoice attachment* endpoint uploads an attachment and assigns it against a specific `invoiceId`. - + [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) are itemized records of goods sold or services provided to a customer. - + **Integration-specific behaviour** - + For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=invoices) for integrations that support uploading an invoice attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -531,9 +616,13 @@ def upload_attachment(self, request: operations.UploadInvoiceAttachmentRequest, client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, data=data, files=form, headers=headers) @@ -551,8 +640,10 @@ def do_request(): pass elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/items.py b/previous-versions/accounting/src/codataccounting/items.py index dc5b82423..6ce5f2f6a 100755 --- a/previous-versions/accounting/src/codataccounting/items.py +++ b/previous-versions/accounting/src/codataccounting/items.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class Items: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateItemRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateItemResponse: r"""Create item The *Create item* endpoint creates a new [item](https://docs.codat.io/accounting-api#/schemas/Item) for a given company's connection. - + [Items](https://docs.codat.io/accounting-api#/schemas/Item) allow your customers to save and track details of the products and services that they buy and sell. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create item model](https://docs.codat.io/accounting-api#/operations/get-create-items-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateItemRequest, retries: Optional[utils. if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateItemRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateItemResponse]) res.create_item_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,25 +77,29 @@ def do_request(): def get(self, request: operations.GetItemRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetItemResponse: r"""Get item The *Get item* endpoint returns a single item for a given itemId. - + [Items](https://docs.codat.io/accounting-api#/schemas/Item) allow your customers to save and track details of the products and services that they buy and sell. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support getting a specific item. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetItemRequest, base_url, '/companies/{companyId}/data/items/{itemId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -105,14 +117,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Item]) res.item = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetItem409ApplicationJSON]) - res.get_item_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -120,27 +132,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreateItemsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateItemsModelResponse: r"""Get create item model The *Get create item model* endpoint returns the expected data for the request payload when creating an [item](https://docs.codat.io/accounting-api#/schemas/Item) for a given company and integration. - + [Items](https://docs.codat.io/accounting-api#/schemas/Item) allow your customers to save and track details of the products and services that they buy and sell. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=items) for integrations that support creating an item. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateItemsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/items', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -158,10 +174,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -169,9 +189,9 @@ def do_request(): def list(self, request: operations.ListItemsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListItemsResponse: r"""List items The *List items* endpoint returns a list of [items](https://docs.codat.io/accounting-api#/schemas/Item) for a given company's connection. - + [Items](https://docs.codat.io/accounting-api#/schemas/Item) allow your customers to save and track details of the products and services that they buy and sell. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -179,14 +199,18 @@ def list(self, request: operations.ListItemsRequest, retries: Optional[utils.Ret url = utils.generate_url(operations.ListItemsRequest, base_url, '/companies/{companyId}/data/items', request) headers = {} query_params = utils.get_query_params(operations.ListItemsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -204,14 +228,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Items1]) res.items = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListItems409ApplicationJSON]) - res.list_items_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/journal_entries.py b/previous-versions/accounting/src/codataccounting/journal_entries.py index 8bbafc824..76c13a6db 100755 --- a/previous-versions/accounting/src/codataccounting/journal_entries.py +++ b/previous-versions/accounting/src/codataccounting/journal_entries.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class JournalEntries: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateJournalEntryRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateJournalEntryResponse: r"""Create journal entry The *Create journal entry* endpoint creates a new [journal entry](https://docs.codat.io/accounting-api#/schemas/JournalEntry) for a given company's connection. - + [Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create journal entry model](https://docs.codat.io/accounting-api#/operations/get-create-journalEntries-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateJournalEntryRequest, retries: Optiona if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateJournalEntryRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateJournalEntryResponse]) res.create_journal_entry_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -73,31 +81,31 @@ def delete(self, request: operations.DeleteJournalEntryRequest, retries: Optiona >Because journal entries underpin every transaction in an accounting platform, deleting a journal entry can affect every transaction for a given company. > > **Before you proceed, make sure you understand the implications of deleting journal entries from an accounting perspective.** - + The *Delete journal entry* endpoint allows you to delete a specified journal entry from an accounting platform. - + [Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. - + ### Process 1. Pass the `{journalEntryId}` to the *Delete journal entry* endpoint and store the `pushOperationKey` returned. 2. Check the status of the delete by checking the status of push operation either via 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). - + A `Success` status indicates that the journal entry object was deleted from the accounting platform. 3. (Optional) Check that the journal entry was deleted from the accounting platform. - + ### Effect on related objects - + Be aware that deleting a journal entry from an accounting platform might cause related objects to be modified. For example, if you delete the journal entry for a paid invoice in QuickBooks Online, the invoice is deleted but the payment against that invoice is not. The payment is converted to a payment on account. - + ## Integration specifics Integrations that support soft delete do not permanently delete the object in the accounting platform. - + | Integration | Soft Deleted | |-------------|--------------| | QuickBooks Online | Yes | - + > **Supported Integrations** > > This functionality is currently only supported for our QuickBooks Online integration. Check out our [public roadmap](https://portal.productboard.com/codat/7-public-product-roadmap/tabs/46-accounting-api) to see what we're building next, and to submit ideas for new features. @@ -106,14 +114,18 @@ def delete(self, request: operations.DeleteJournalEntryRequest, retries: Optiona url = utils.generate_url(operations.DeleteJournalEntryRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/journalEntries/{journalEntryId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('DELETE', url, headers=headers) @@ -131,10 +143,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOperationSummary]) res.push_operation_summary = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -142,25 +158,29 @@ def do_request(): def get(self, request: operations.GetJournalEntryRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetJournalEntryResponse: r"""Get journal entry The *Get journal entry* endpoint returns a single journal entry for a given journalEntryId. - + [Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support getting a specific journal entry. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetJournalEntryRequest, base_url, '/companies/{companyId}/data/journalEntries/{journalEntryId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -178,14 +198,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.JournalEntry]) res.journal_entry = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetJournalEntry409ApplicationJSON]) - res.get_journal_entry_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -193,27 +213,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreateJournalEntriesModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateJournalEntriesModelResponse: r"""Get create journal entry model The *Get create journal entry model* endpoint returns the expected data for the request payload when creating a [journal entry](https://docs.codat.io/accounting-api#/schemas/JournalEntry) for a given company and integration. - + [Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating a journal entry. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateJournalEntriesModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/journalEntries', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -231,10 +255,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -242,9 +270,9 @@ def do_request(): def list(self, request: operations.ListJournalEntriesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListJournalEntriesResponse: r"""List journal entries The *List journal entries* endpoint returns a list of [journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) for a given company's connection. - + [Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -252,14 +280,18 @@ def list(self, request: operations.ListJournalEntriesRequest, retries: Optional[ url = utils.generate_url(operations.ListJournalEntriesRequest, base_url, '/companies/{companyId}/data/journalEntries', request) headers = {} query_params = utils.get_query_params(operations.ListJournalEntriesRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -277,14 +309,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.JournalEntries]) res.journal_entries = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListJournalEntries409ApplicationJSON]) - res.list_journal_entries_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/journals.py b/previous-versions/accounting/src/codataccounting/journals.py index e2d887c5f..cd32e8acb 100755 --- a/previous-versions/accounting/src/codataccounting/journals.py +++ b/previous-versions/accounting/src/codataccounting/journals.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class Journals: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateJournalRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateJournalResponse: r"""Create journal The *Create journal* endpoint creates a new [journal](https://docs.codat.io/accounting-api#/schemas/Journal) for a given company's connection. - + [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) are used to record all the financial transactions of a company. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create journal model](https://docs.codat.io/accounting-api#/operations/get-create-journals-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreateJournalRequest, retries: Optional[uti if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreateJournalRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateJournalResponse]) res.create_journal_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,25 +77,29 @@ def do_request(): def get(self, request: operations.GetJournalRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetJournalResponse: r"""Get journal The *Get journal* endpoint returns a single journal for a given journalId. - + [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) are used to record all the financial transactions of a company. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support getting a specific journal. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetJournalRequest, base_url, '/companies/{companyId}/data/journals/{journalId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -105,14 +117,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Journal]) res.journal = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetJournal409ApplicationJSON]) - res.get_journal_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -120,27 +132,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreateJournalsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateJournalsModelResponse: r"""Get create journal model The *Get create journal model* endpoint returns the expected data for the request payload when creating a [journal](https://docs.codat.io/accounting-api#/schemas/Journal) for a given company and integration. - + [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) are used to record all the financial transactions of a company. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating a journal. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateJournalsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/journals', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -158,10 +174,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -169,9 +189,9 @@ def do_request(): def list(self, request: operations.ListJournalsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListJournalsResponse: r"""List journals The *List journals* endpoint returns a list of [journals](https://docs.codat.io/accounting-api#/schemas/Journal) for a given company's connection. - + [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) are used to record all the financial transactions of a company. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -179,14 +199,18 @@ def list(self, request: operations.ListJournalsRequest, retries: Optional[utils. url = utils.generate_url(operations.ListJournalsRequest, base_url, '/companies/{companyId}/data/journals', request) headers = {} query_params = utils.get_query_params(operations.ListJournalsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -204,14 +228,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Journals]) res.journals = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListJournals409ApplicationJSON]) - res.list_journals_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/models/errors/__init__.py b/previous-versions/accounting/src/codataccounting/models/errors/__init__.py new file mode 100755 index 000000000..cfd848441 --- /dev/null +++ b/previous-versions/accounting/src/codataccounting/models/errors/__init__.py @@ -0,0 +1,4 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from .sdkerror import SDKError +__all__ = ["SDKError"] diff --git a/previous-versions/accounting/src/codataccounting/models/errors/sdkerror.py b/previous-versions/accounting/src/codataccounting/models/errors/sdkerror.py new file mode 100755 index 000000000..6bb02bbd6 --- /dev/null +++ b/previous-versions/accounting/src/codataccounting/models/errors/sdkerror.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +import requests as requests_http + + +class SDKError(Exception): + """Represents an error returned by the API.""" + message: str + status_code: int + body: str + raw_response: requests_http.Response + + def __init__(self, message: str, status_code: int, body: str, raw_response: requests_http.Response): + self.message = message + self.status_code = status_code + self.body = body + self.raw_response = raw_response + + def __str__(self): + body = '' + if len(self.body) > 0: + body = f'\n{self.body}' + + return f'{self.message}: Status {self.status_code}{body}' diff --git a/previous-versions/accounting/src/codataccounting/models/operations/__init__.py b/previous-versions/accounting/src/codataccounting/models/operations/__init__.py index 75a3e5a28..1d5729d44 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/__init__.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/__init__.py @@ -122,8 +122,10 @@ from .update_purchase_order import * from .update_supplier import * from .upload_bill_attachment import * +from .upload_billcreditnote_attachment import * from .upload_direct_cost_attachment import * from .upload_direct_income_attachment import * from .upload_invoice_attachment import * +from .upload_transfer_attachment import * -__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateBankAccountRequest","CreateBankAccountResponse","CreateBankTransactionsRequest","CreateBankTransactionsResponse","CreateBillCreditNoteRequest","CreateBillCreditNoteResponse","CreateBillPaymentRequest","CreateBillPaymentResponse","CreateBillRequest","CreateBillResponse","CreateCreditNoteRequest","CreateCreditNoteResponse","CreateCustomerRequest","CreateCustomerResponse","CreateDirectCostRequest","CreateDirectCostResponse","CreateDirectIncomeRequest","CreateDirectIncomeResponse","CreateInvoiceRequest","CreateInvoiceResponse","CreateItemRequest","CreateItemResponse","CreateJournalEntryRequest","CreateJournalEntryResponse","CreateJournalRequest","CreateJournalResponse","CreatePaymentRequest","CreatePaymentResponse","CreatePurchaseOrderRequest","CreatePurchaseOrderResponse","CreateSupplierRequest","CreateSupplierResponse","CreateTransferRequest","CreateTransferResponse","DeleteBillPaymentRequest","DeleteBillPaymentResponse","DeleteBillRequest","DeleteBillResponse","DeleteInvoiceRequest","DeleteInvoiceResponse","DeleteJournalEntryRequest","DeleteJournalEntryResponse","DownloadBillAttachmentRequest","DownloadBillAttachmentResponse","DownloadCustomerAttachmentRequest","DownloadCustomerAttachmentResponse","DownloadDirectCostAttachmentRequest","DownloadDirectCostAttachmentResponse","DownloadDirectIncomeAttachmentRequest","DownloadDirectIncomeAttachmentResponse","DownloadInvoiceAttachmentRequest","DownloadInvoiceAttachmentResponse","DownloadInvoicePdfRequest","DownloadInvoicePdfResponse","DownloadSupplierAttachmentRequest","DownloadSupplierAttachmentResponse","GetAccount409ApplicationJSON","GetAccountRequest","GetAccountResponse","GetAccountTransaction409ApplicationJSON","GetAccountTransactionRequest","GetAccountTransactionResponse","GetAgedCreditorsReportRequest","GetAgedCreditorsReportResponse","GetAgedDebtorsReportRequest","GetAgedDebtorsReportResponse","GetBalanceSheet409ApplicationJSON","GetBalanceSheetRequest","GetBalanceSheetResponse","GetBankAccount409ApplicationJSON","GetBankAccountRequest","GetBankAccountResponse","GetBill409ApplicationJSON","GetBillAttachmentRequest","GetBillAttachmentResponse","GetBillCreditNote409ApplicationJSON","GetBillCreditNoteRequest","GetBillCreditNoteResponse","GetBillPayments409ApplicationJSON","GetBillPaymentsRequest","GetBillPaymentsResponse","GetBillRequest","GetBillResponse","GetCashFlowStatement409ApplicationJSON","GetCashFlowStatementRequest","GetCashFlowStatementResponse","GetCompanyInfo409ApplicationJSON","GetCompanyInfoRequest","GetCompanyInfoResponse","GetCreateBankTransactionsModelRequest","GetCreateBankTransactionsModelResponse","GetCreateBillPaymentsModelRequest","GetCreateBillPaymentsModelResponse","GetCreateChartOfAccountsModelRequest","GetCreateChartOfAccountsModelResponse","GetCreateDirectCostsModelRequest","GetCreateDirectCostsModelResponse","GetCreateDirectIncomesModelRequest","GetCreateDirectIncomesModelResponse","GetCreateItemsModelRequest","GetCreateItemsModelResponse","GetCreateJournalEntriesModelRequest","GetCreateJournalEntriesModelResponse","GetCreateJournalsModelRequest","GetCreateJournalsModelResponse","GetCreatePaymentsModelRequest","GetCreatePaymentsModelResponse","GetCreateTransfersModelRequest","GetCreateTransfersModelResponse","GetCreateUpdateBankAccountsModelRequest","GetCreateUpdateBankAccountsModelResponse","GetCreateUpdateBillCreditNotesModelRequest","GetCreateUpdateBillCreditNotesModelResponse","GetCreateUpdateBillsModelRequest","GetCreateUpdateBillsModelResponse","GetCreateUpdateCreditNotesModelRequest","GetCreateUpdateCreditNotesModelResponse","GetCreateUpdateCustomersModelRequest","GetCreateUpdateCustomersModelResponse","GetCreateUpdateInvoicesModelRequest","GetCreateUpdateInvoicesModelResponse","GetCreateUpdatePurchaseOrdersModelRequest","GetCreateUpdatePurchaseOrdersModelResponse","GetCreateUpdateSuppliersModelRequest","GetCreateUpdateSuppliersModelResponse","GetCreditNote409ApplicationJSON","GetCreditNoteRequest","GetCreditNoteResponse","GetCustomer409ApplicationJSON","GetCustomerAttachmentRequest","GetCustomerAttachmentResponse","GetCustomerRequest","GetCustomerResponse","GetDirectCost409ApplicationJSON","GetDirectCostAttachmentRequest","GetDirectCostAttachmentResponse","GetDirectCostRequest","GetDirectCostResponse","GetDirectIncome409ApplicationJSON","GetDirectIncomeAttachmentRequest","GetDirectIncomeAttachmentResponse","GetDirectIncomeRequest","GetDirectIncomeResponse","GetInvoice409ApplicationJSON","GetInvoiceAttachmentRequest","GetInvoiceAttachmentResponse","GetInvoiceRequest","GetInvoiceResponse","GetItem409ApplicationJSON","GetItemRequest","GetItemResponse","GetJournal409ApplicationJSON","GetJournalEntry409ApplicationJSON","GetJournalEntryRequest","GetJournalEntryResponse","GetJournalRequest","GetJournalResponse","GetPayment409ApplicationJSON","GetPaymentMethod409ApplicationJSON","GetPaymentMethodRequest","GetPaymentMethodResponse","GetPaymentRequest","GetPaymentResponse","GetProfitAndLoss409ApplicationJSON","GetProfitAndLossRequest","GetProfitAndLossResponse","GetPurchaseOrder409ApplicationJSON","GetPurchaseOrderRequest","GetPurchaseOrderResponse","GetSalesOrder409ApplicationJSON","GetSalesOrderRequest","GetSalesOrderResponse","GetSupplier409ApplicationJSON","GetSupplierAttachmentRequest","GetSupplierAttachmentResponse","GetSupplierRequest","GetSupplierResponse","GetTaxRate409ApplicationJSON","GetTaxRateRequest","GetTaxRateResponse","GetTrackingCategory409ApplicationJSON","GetTrackingCategoryRequest","GetTrackingCategoryResponse","GetTransfer409ApplicationJSON","GetTransferRequest","GetTransferResponse","IsAgedCreditorsReportAvailableRequest","IsAgedCreditorsReportAvailableResponse","IsAgedDebtorReportAvailableRequest","IsAgedDebtorReportAvailableResponse","ListAccountTransactions409ApplicationJSON","ListAccountTransactionsRequest","ListAccountTransactionsResponse","ListAccounts409ApplicationJSON","ListAccountsRequest","ListAccountsResponse","ListBankAccountTransactions409ApplicationJSON","ListBankAccountTransactionsRequest","ListBankAccountTransactionsResponse","ListBankAccounts409ApplicationJSON","ListBankAccountsRequest","ListBankAccountsResponse","ListBillAttachmentsRequest","ListBillAttachmentsResponse","ListBillCreditNotes409ApplicationJSON","ListBillCreditNotesRequest","ListBillCreditNotesResponse","ListBillPayments409ApplicationJSON","ListBillPaymentsRequest","ListBillPaymentsResponse","ListBills409ApplicationJSON","ListBillsRequest","ListBillsResponse","ListCreditNotes409ApplicationJSON","ListCreditNotesRequest","ListCreditNotesResponse","ListCustomerAttachmentsRequest","ListCustomerAttachmentsResponse","ListCustomers409ApplicationJSON","ListCustomersRequest","ListCustomersResponse","ListDirectCostAttachmentsRequest","ListDirectCostAttachmentsResponse","ListDirectCosts409ApplicationJSON","ListDirectCostsRequest","ListDirectCostsResponse","ListDirectIncomeAttachmentsRequest","ListDirectIncomeAttachmentsResponse","ListDirectIncomes409ApplicationJSON","ListDirectIncomesRequest","ListDirectIncomesResponse","ListInvoiceAttachmentsRequest","ListInvoiceAttachmentsResponse","ListInvoices409ApplicationJSON","ListInvoicesRequest","ListInvoicesResponse","ListItems409ApplicationJSON","ListItemsRequest","ListItemsResponse","ListJournalEntries409ApplicationJSON","ListJournalEntriesRequest","ListJournalEntriesResponse","ListJournals409ApplicationJSON","ListJournalsRequest","ListJournalsResponse","ListPaymentMethods409ApplicationJSON","ListPaymentMethodsRequest","ListPaymentMethodsResponse","ListPayments409ApplicationJSON","ListPaymentsRequest","ListPaymentsResponse","ListPurchaseOrders409ApplicationJSON","ListPurchaseOrdersRequest","ListPurchaseOrdersResponse","ListSalesOrders409ApplicationJSON","ListSalesOrdersRequest","ListSalesOrdersResponse","ListSupplierAttachmentsRequest","ListSupplierAttachmentsResponse","ListSuppliers409ApplicationJSON","ListSuppliersRequest","ListSuppliersResponse","ListTaxRates409ApplicationJSON","ListTaxRatesRequest","ListTaxRatesResponse","ListTrackingCategories409ApplicationJSON","ListTrackingCategoriesRequest","ListTrackingCategoriesResponse","ListTransfers409ApplicationJSON","ListTransfersRequest","ListTransfersResponse","RefreshCompanyInfoRequest","RefreshCompanyInfoResponse","UpdateBankAccountRequest","UpdateBankAccountResponse","UpdateBillCreditNoteRequest","UpdateBillCreditNoteResponse","UpdateBillRequest","UpdateBillResponse","UpdateCreditNoteRequest","UpdateCreditNoteResponse","UpdateCustomerRequest","UpdateCustomerResponse","UpdateInvoiceRequest","UpdateInvoiceResponse","UpdatePurchaseOrderRequest","UpdatePurchaseOrderResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadBillAttachmentRequest","UploadBillAttachmentRequestBody","UploadBillAttachmentResponse","UploadDirectCostAttachmentRequest","UploadDirectCostAttachmentRequestBody","UploadDirectCostAttachmentResponse","UploadDirectIncomeAttachmentRequest","UploadDirectIncomeAttachmentRequestBody","UploadDirectIncomeAttachmentResponse","UploadInvoiceAttachmentRequest","UploadInvoiceAttachmentRequestBody","UploadInvoiceAttachmentResponse"] +__all__ = ["CreateAccountRequest","CreateAccountResponse","CreateBankAccountRequest","CreateBankAccountResponse","CreateBankTransactionsRequest","CreateBankTransactionsResponse","CreateBillCreditNoteRequest","CreateBillCreditNoteResponse","CreateBillPaymentRequest","CreateBillPaymentResponse","CreateBillRequest","CreateBillResponse","CreateCreditNoteRequest","CreateCreditNoteResponse","CreateCustomerRequest","CreateCustomerResponse","CreateDirectCostRequest","CreateDirectCostResponse","CreateDirectIncomeRequest","CreateDirectIncomeResponse","CreateInvoiceRequest","CreateInvoiceResponse","CreateItemRequest","CreateItemResponse","CreateJournalEntryRequest","CreateJournalEntryResponse","CreateJournalRequest","CreateJournalResponse","CreatePaymentRequest","CreatePaymentResponse","CreatePurchaseOrderRequest","CreatePurchaseOrderResponse","CreateSupplierRequest","CreateSupplierResponse","CreateTransferRequest","CreateTransferResponse","DeleteBillPaymentRequest","DeleteBillPaymentResponse","DeleteBillRequest","DeleteBillResponse","DeleteInvoiceRequest","DeleteInvoiceResponse","DeleteJournalEntryRequest","DeleteJournalEntryResponse","DownloadBillAttachmentRequest","DownloadBillAttachmentResponse","DownloadCustomerAttachmentRequest","DownloadCustomerAttachmentResponse","DownloadDirectCostAttachmentRequest","DownloadDirectCostAttachmentResponse","DownloadDirectIncomeAttachmentRequest","DownloadDirectIncomeAttachmentResponse","DownloadInvoiceAttachmentRequest","DownloadInvoiceAttachmentResponse","DownloadInvoicePdfRequest","DownloadInvoicePdfResponse","DownloadSupplierAttachmentRequest","DownloadSupplierAttachmentResponse","GetAccountRequest","GetAccountResponse","GetAccountTransactionRequest","GetAccountTransactionResponse","GetAgedCreditorsReportRequest","GetAgedCreditorsReportResponse","GetAgedDebtorsReportRequest","GetAgedDebtorsReportResponse","GetBalanceSheetRequest","GetBalanceSheetResponse","GetBankAccountRequest","GetBankAccountResponse","GetBillAttachmentRequest","GetBillAttachmentResponse","GetBillCreditNoteRequest","GetBillCreditNoteResponse","GetBillPaymentsRequest","GetBillPaymentsResponse","GetBillRequest","GetBillResponse","GetCashFlowStatementRequest","GetCashFlowStatementResponse","GetCompanyInfoRequest","GetCompanyInfoResponse","GetCreateBankTransactionsModelRequest","GetCreateBankTransactionsModelResponse","GetCreateBillPaymentsModelRequest","GetCreateBillPaymentsModelResponse","GetCreateChartOfAccountsModelRequest","GetCreateChartOfAccountsModelResponse","GetCreateDirectCostsModelRequest","GetCreateDirectCostsModelResponse","GetCreateDirectIncomesModelRequest","GetCreateDirectIncomesModelResponse","GetCreateItemsModelRequest","GetCreateItemsModelResponse","GetCreateJournalEntriesModelRequest","GetCreateJournalEntriesModelResponse","GetCreateJournalsModelRequest","GetCreateJournalsModelResponse","GetCreatePaymentsModelRequest","GetCreatePaymentsModelResponse","GetCreateTransfersModelRequest","GetCreateTransfersModelResponse","GetCreateUpdateBankAccountsModelRequest","GetCreateUpdateBankAccountsModelResponse","GetCreateUpdateBillCreditNotesModelRequest","GetCreateUpdateBillCreditNotesModelResponse","GetCreateUpdateBillsModelRequest","GetCreateUpdateBillsModelResponse","GetCreateUpdateCreditNotesModelRequest","GetCreateUpdateCreditNotesModelResponse","GetCreateUpdateCustomersModelRequest","GetCreateUpdateCustomersModelResponse","GetCreateUpdateInvoicesModelRequest","GetCreateUpdateInvoicesModelResponse","GetCreateUpdatePurchaseOrdersModelRequest","GetCreateUpdatePurchaseOrdersModelResponse","GetCreateUpdateSuppliersModelRequest","GetCreateUpdateSuppliersModelResponse","GetCreditNoteRequest","GetCreditNoteResponse","GetCustomerAttachmentRequest","GetCustomerAttachmentResponse","GetCustomerRequest","GetCustomerResponse","GetDirectCostAttachmentRequest","GetDirectCostAttachmentResponse","GetDirectCostRequest","GetDirectCostResponse","GetDirectIncomeAttachmentRequest","GetDirectIncomeAttachmentResponse","GetDirectIncomeRequest","GetDirectIncomeResponse","GetInvoiceAttachmentRequest","GetInvoiceAttachmentResponse","GetInvoiceRequest","GetInvoiceResponse","GetItemRequest","GetItemResponse","GetJournalEntryRequest","GetJournalEntryResponse","GetJournalRequest","GetJournalResponse","GetPaymentMethodRequest","GetPaymentMethodResponse","GetPaymentRequest","GetPaymentResponse","GetProfitAndLossRequest","GetProfitAndLossResponse","GetPurchaseOrderRequest","GetPurchaseOrderResponse","GetSalesOrderRequest","GetSalesOrderResponse","GetSupplierAttachmentRequest","GetSupplierAttachmentResponse","GetSupplierRequest","GetSupplierResponse","GetTaxRateRequest","GetTaxRateResponse","GetTrackingCategoryRequest","GetTrackingCategoryResponse","GetTransferRequest","GetTransferResponse","IsAgedCreditorsReportAvailableRequest","IsAgedCreditorsReportAvailableResponse","IsAgedDebtorReportAvailableRequest","IsAgedDebtorReportAvailableResponse","ListAccountTransactionsRequest","ListAccountTransactionsResponse","ListAccountsRequest","ListAccountsResponse","ListBankAccountTransactionsRequest","ListBankAccountTransactionsResponse","ListBankAccountsRequest","ListBankAccountsResponse","ListBillAttachmentsRequest","ListBillAttachmentsResponse","ListBillCreditNotesRequest","ListBillCreditNotesResponse","ListBillPaymentsRequest","ListBillPaymentsResponse","ListBillsRequest","ListBillsResponse","ListCreditNotesRequest","ListCreditNotesResponse","ListCustomerAttachmentsRequest","ListCustomerAttachmentsResponse","ListCustomersRequest","ListCustomersResponse","ListDirectCostAttachmentsRequest","ListDirectCostAttachmentsResponse","ListDirectCostsRequest","ListDirectCostsResponse","ListDirectIncomeAttachmentsRequest","ListDirectIncomeAttachmentsResponse","ListDirectIncomesRequest","ListDirectIncomesResponse","ListInvoiceAttachmentsRequest","ListInvoiceAttachmentsResponse","ListInvoicesRequest","ListInvoicesResponse","ListItemsRequest","ListItemsResponse","ListJournalEntriesRequest","ListJournalEntriesResponse","ListJournalsRequest","ListJournalsResponse","ListPaymentMethodsRequest","ListPaymentMethodsResponse","ListPaymentsRequest","ListPaymentsResponse","ListPurchaseOrdersRequest","ListPurchaseOrdersResponse","ListSalesOrdersRequest","ListSalesOrdersResponse","ListSupplierAttachmentsRequest","ListSupplierAttachmentsResponse","ListSuppliersRequest","ListSuppliersResponse","ListTaxRatesRequest","ListTaxRatesResponse","ListTrackingCategoriesRequest","ListTrackingCategoriesResponse","ListTransfersRequest","ListTransfersResponse","RefreshCompanyInfoRequest","RefreshCompanyInfoResponse","UpdateBankAccountRequest","UpdateBankAccountResponse","UpdateBillCreditNoteRequest","UpdateBillCreditNoteResponse","UpdateBillRequest","UpdateBillResponse","UpdateCreditNoteRequest","UpdateCreditNoteResponse","UpdateCustomerRequest","UpdateCustomerResponse","UpdateInvoiceRequest","UpdateInvoiceResponse","UpdatePurchaseOrderRequest","UpdatePurchaseOrderResponse","UpdateSupplierRequest","UpdateSupplierResponse","UploadBillAttachmentRequest","UploadBillAttachmentRequestBody","UploadBillAttachmentResponse","UploadBillCreditNoteAttachmentRequest","UploadBillCreditNoteAttachmentRequestBody","UploadBillCreditNoteAttachmentResponse","UploadDirectCostAttachmentRequest","UploadDirectCostAttachmentRequestBody","UploadDirectCostAttachmentResponse","UploadDirectIncomeAttachmentRequest","UploadDirectIncomeAttachmentRequestBody","UploadDirectIncomeAttachmentResponse","UploadInvoiceAttachmentRequest","UploadInvoiceAttachmentRequestBody","UploadInvoiceAttachmentResponse","UploadTransferAttachmentRequest","UploadTransferAttachmentRequestBody","UploadTransferAttachmentResponse"] diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_account.py b/previous-versions/accounting/src/codataccounting/models/operations/create_account.py index bbf7a8163..de86deb4a 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_account.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_account.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import account as shared_account from ..shared import createaccountresponse as shared_createaccountresponse -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class CreateAccountResponse: status_code: int = dataclasses.field() create_account_response: Optional[shared_createaccountresponse.CreateAccountResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_bank_account.py b/previous-versions/accounting/src/codataccounting/models/operations/create_bank_account.py index 740c488ea..5d25a864c 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_bank_account.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_bank_account.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import bankaccount as shared_bankaccount from ..shared import createbankaccountresponse as shared_createbankaccountresponse -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -28,8 +28,8 @@ class CreateBankAccountResponse: status_code: int = dataclasses.field() create_bank_account_response: Optional[shared_createbankaccountresponse.CreateBankAccountResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_bank_transactions.py b/previous-versions/accounting/src/codataccounting/models/operations/create_bank_transactions.py index d215a3cb2..785da2860 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_bank_transactions.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_bank_transactions.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import createbanktransactions as shared_createbanktransactions from ..shared import createbanktransactionsresponse as shared_createbanktransactionsresponse -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -30,8 +30,8 @@ class CreateBankTransactionsResponse: status_code: int = dataclasses.field() create_bank_transactions_response: Optional[shared_createbanktransactionsresponse.CreateBankTransactionsResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_bill.py b/previous-versions/accounting/src/codataccounting/models/operations/create_bill.py index 863138235..2f92ad295 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_bill.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_bill.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import bill as shared_bill from ..shared import createbillresponse as shared_createbillresponse -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class CreateBillResponse: status_code: int = dataclasses.field() create_bill_response: Optional[shared_createbillresponse.CreateBillResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_bill_credit_note.py b/previous-versions/accounting/src/codataccounting/models/operations/create_bill_credit_note.py index 288e3ed9f..f6e327e8d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_bill_credit_note.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_bill_credit_note.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import billcreditnote as shared_billcreditnote from ..shared import createbillcreditnoteresponse as shared_createbillcreditnoteresponse -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class CreateBillCreditNoteResponse: status_code: int = dataclasses.field() create_bill_credit_note_response: Optional[shared_createbillcreditnoteresponse.CreateBillCreditNoteResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_bill_payment.py b/previous-versions/accounting/src/codataccounting/models/operations/create_bill_payment.py index 45db4395e..9de0d5a10 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_bill_payment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_bill_payment.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import billpayment as shared_billpayment from ..shared import createbillpaymentresponse as shared_createbillpaymentresponse -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class CreateBillPaymentResponse: status_code: int = dataclasses.field() create_bill_payment_response: Optional[shared_createbillpaymentresponse.CreateBillPaymentResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_credit_note.py b/previous-versions/accounting/src/codataccounting/models/operations/create_credit_note.py index eba7bd12f..c7473d02a 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_credit_note.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_credit_note.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import createcreditnoteresponse as shared_createcreditnoteresponse from ..shared import creditnote as shared_creditnote -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class CreateCreditNoteResponse: status_code: int = dataclasses.field() create_credit_note_response: Optional[shared_createcreditnoteresponse.CreateCreditNoteResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_customer.py b/previous-versions/accounting/src/codataccounting/models/operations/create_customer.py index 999bd2e92..f1fe24491 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_customer.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_customer.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import createcustomerresponse as shared_createcustomerresponse from ..shared import customer as shared_customer -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class CreateCustomerResponse: status_code: int = dataclasses.field() create_customer_response: Optional[shared_createcustomerresponse.CreateCustomerResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_direct_cost.py b/previous-versions/accounting/src/codataccounting/models/operations/create_direct_cost.py index 762cecbb2..d8722b46b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_direct_cost.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_direct_cost.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import createdirectcostresponse as shared_createdirectcostresponse from ..shared import directcost as shared_directcost -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class CreateDirectCostResponse: status_code: int = dataclasses.field() create_direct_cost_response: Optional[shared_createdirectcostresponse.CreateDirectCostResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_direct_income.py b/previous-versions/accounting/src/codataccounting/models/operations/create_direct_income.py index 7c5d64770..a5b66cffc 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_direct_income.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_direct_income.py @@ -5,7 +5,7 @@ import requests as requests_http from ..shared import createdirectincomeresponse as shared_createdirectincomeresponse from ..shared import directincome as shared_directincome -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class CreateDirectIncomeResponse: status_code: int = dataclasses.field() create_direct_income_response: Optional[shared_createdirectincomeresponse.CreateDirectIncomeResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_invoice.py b/previous-versions/accounting/src/codataccounting/models/operations/create_invoice.py index ad7356431..6e4b7b38e 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_invoice.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_invoice.py @@ -4,8 +4,8 @@ import dataclasses import requests as requests_http from ..shared import createinvoiceresponse as shared_createinvoiceresponse +from ..shared import errormessage as shared_errormessage from ..shared import invoice as shared_invoice -from ..shared import schema as shared_schema from typing import Optional @@ -27,8 +27,8 @@ class CreateInvoiceResponse: status_code: int = dataclasses.field() create_invoice_response: Optional[shared_createinvoiceresponse.CreateInvoiceResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_item.py b/previous-versions/accounting/src/codataccounting/models/operations/create_item.py index 9d3445382..a4eeb06fc 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_item.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_item.py @@ -4,8 +4,8 @@ import dataclasses import requests as requests_http from ..shared import createitemresponse as shared_createitemresponse +from ..shared import errormessage as shared_errormessage from ..shared import item as shared_item -from ..shared import schema as shared_schema from typing import Optional @@ -27,8 +27,8 @@ class CreateItemResponse: status_code: int = dataclasses.field() create_item_response: Optional[shared_createitemresponse.CreateItemResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_journal.py b/previous-versions/accounting/src/codataccounting/models/operations/create_journal.py index 8f4b56807..5eac7f6c2 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_journal.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_journal.py @@ -4,8 +4,8 @@ import dataclasses import requests as requests_http from ..shared import createjournalresponse as shared_createjournalresponse +from ..shared import errormessage as shared_errormessage from ..shared import journal as shared_journal -from ..shared import schema as shared_schema from typing import Optional @@ -27,8 +27,8 @@ class CreateJournalResponse: status_code: int = dataclasses.field() create_journal_response: Optional[shared_createjournalresponse.CreateJournalResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_journal_entry.py b/previous-versions/accounting/src/codataccounting/models/operations/create_journal_entry.py index 3498888dc..840f0cd65 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_journal_entry.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_journal_entry.py @@ -4,8 +4,8 @@ import dataclasses import requests as requests_http from ..shared import createjournalentryresponse as shared_createjournalentryresponse +from ..shared import errormessage as shared_errormessage from ..shared import journalentry as shared_journalentry -from ..shared import schema as shared_schema from typing import Optional @@ -27,8 +27,8 @@ class CreateJournalEntryResponse: status_code: int = dataclasses.field() create_journal_entry_response: Optional[shared_createjournalentryresponse.CreateJournalEntryResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_payment.py b/previous-versions/accounting/src/codataccounting/models/operations/create_payment.py index 666ce63dc..e0cbaee3e 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_payment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_payment.py @@ -4,8 +4,8 @@ import dataclasses import requests as requests_http from ..shared import createpaymentresponse as shared_createpaymentresponse +from ..shared import errormessage as shared_errormessage from ..shared import payment as shared_payment -from ..shared import schema as shared_schema from typing import Optional @@ -27,8 +27,8 @@ class CreatePaymentResponse: status_code: int = dataclasses.field() create_payment_response: Optional[shared_createpaymentresponse.CreatePaymentResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_purchase_order.py b/previous-versions/accounting/src/codataccounting/models/operations/create_purchase_order.py index 43930bd45..18e2fe343 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_purchase_order.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_purchase_order.py @@ -4,8 +4,8 @@ import dataclasses import requests as requests_http from ..shared import createpurchaseorderresponse as shared_createpurchaseorderresponse +from ..shared import errormessage as shared_errormessage from ..shared import purchaseorder as shared_purchaseorder -from ..shared import schema as shared_schema from typing import Optional @@ -27,8 +27,8 @@ class CreatePurchaseOrderResponse: status_code: int = dataclasses.field() create_purchase_order_response: Optional[shared_createpurchaseorderresponse.CreatePurchaseOrderResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_supplier.py b/previous-versions/accounting/src/codataccounting/models/operations/create_supplier.py index 7c580d520..9bdf8f9f4 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_supplier.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_supplier.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import createsupplierresponse as shared_createsupplierresponse -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import supplier as shared_supplier from typing import Optional @@ -27,8 +27,8 @@ class CreateSupplierResponse: status_code: int = dataclasses.field() create_supplier_response: Optional[shared_createsupplierresponse.CreateSupplierResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/create_transfer.py b/previous-versions/accounting/src/codataccounting/models/operations/create_transfer.py index a6e118812..7a2c189b3 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/create_transfer.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/create_transfer.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import createtransferresponse as shared_createtransferresponse -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import transfer as shared_transfer from typing import Optional @@ -26,8 +26,8 @@ class CreateTransferResponse: status_code: int = dataclasses.field() create_transfer_response: Optional[shared_createtransferresponse.CreateTransferResponse] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/delete_bill.py b/previous-versions/accounting/src/codataccounting/models/operations/delete_bill.py index 8eec33a79..88550f379 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/delete_bill.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/delete_bill.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import pushoperationsummary as shared_pushoperationsummary -from ..shared import schema as shared_schema from typing import Optional @@ -24,10 +24,10 @@ class DeleteBillRequest: class DeleteBillResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_operation_summary: Optional[shared_pushoperationsummary.PushOperationSummary] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/delete_billpayment.py b/previous-versions/accounting/src/codataccounting/models/operations/delete_billpayment.py index 36b38a15a..11d339d43 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/delete_billpayment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/delete_billpayment.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import pushoperationsummary as shared_pushoperationsummary -from ..shared import schema as shared_schema from typing import Optional @@ -23,10 +23,10 @@ class DeleteBillPaymentRequest: class DeleteBillPaymentResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_operation_summary: Optional[shared_pushoperationsummary.PushOperationSummary] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/delete_invoice.py b/previous-versions/accounting/src/codataccounting/models/operations/delete_invoice.py index 55f0c389a..711a3d87f 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/delete_invoice.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/delete_invoice.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import pushoperationsummary as shared_pushoperationsummary -from ..shared import schema as shared_schema from typing import Optional @@ -24,10 +24,10 @@ class DeleteInvoiceRequest: class DeleteInvoiceResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_operation_summary: Optional[shared_pushoperationsummary.PushOperationSummary] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/delete_journal_entry.py b/previous-versions/accounting/src/codataccounting/models/operations/delete_journal_entry.py index 606ed4b6e..7d1f0c532 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/delete_journal_entry.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/delete_journal_entry.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import pushoperationsummary as shared_pushoperationsummary -from ..shared import schema as shared_schema from typing import Optional @@ -24,10 +24,10 @@ class DeleteJournalEntryRequest: class DeleteJournalEntryResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_operation_summary: Optional[shared_pushoperationsummary.PushOperationSummary] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/download_bill_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/download_bill_attachment.py index 6e05b3f7d..8bba7091c 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/download_bill_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/download_bill_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class DownloadBillAttachmentResponse: status_code: int = dataclasses.field() data: Optional[bytes] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/download_customer_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/download_customer_attachment.py index d4595d16d..e36634068 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/download_customer_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/download_customer_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,8 +26,8 @@ class DownloadCustomerAttachmentResponse: status_code: int = dataclasses.field() data: Optional[bytes] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/download_direct_cost_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/download_direct_cost_attachment.py index 4d4427679..e039e203a 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/download_direct_cost_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/download_direct_cost_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class DownloadDirectCostAttachmentResponse: status_code: int = dataclasses.field() data: Optional[bytes] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/download_direct_income_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/download_direct_income_attachment.py index 6d1d73c2f..e276b5a5e 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/download_direct_income_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/download_direct_income_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class DownloadDirectIncomeAttachmentResponse: status_code: int = dataclasses.field() data: Optional[bytes] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/download_invoice_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/download_invoice_attachment.py index 7d676f3b9..a6231ed30 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/download_invoice_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/download_invoice_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class DownloadInvoiceAttachmentResponse: status_code: int = dataclasses.field() data: Optional[bytes] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/download_supplier_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/download_supplier_attachment.py index 35153cbda..fa1c18c76 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/download_supplier_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/download_supplier_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class DownloadSupplierAttachmentResponse: status_code: int = dataclasses.field() data: Optional[bytes] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_account.py b/previous-versions/accounting/src/codataccounting/models/operations/get_account.py index 3a3ad06b7..aba5dc917 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_account.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_account.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import account as shared_account -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -20,21 +18,6 @@ class GetAccountRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetAccount409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetAccountResponse: @@ -42,10 +25,8 @@ class GetAccountResponse: status_code: int = dataclasses.field() account: Optional[shared_account.Account] = dataclasses.field(default=None) r"""Success""" - get_account_409_application_json_object: Optional[GetAccount409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_account_transaction.py b/previous-versions/accounting/src/codataccounting/models/operations/get_account_transaction.py index 82c308048..dc8dc2e3b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_account_transaction.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_account_transaction.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import accounttransaction as shared_accounttransaction -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -20,21 +18,6 @@ class GetAccountTransactionRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetAccountTransaction409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetAccountTransactionResponse: @@ -42,10 +25,8 @@ class GetAccountTransactionResponse: status_code: int = dataclasses.field() account_transaction: Optional[shared_accounttransaction.AccountTransaction] = dataclasses.field(default=None) r"""Success""" - get_account_transaction_409_application_json_object: Optional[GetAccountTransaction409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_aged_creditors_report.py b/previous-versions/accounting/src/codataccounting/models/operations/get_aged_creditors_report.py index 5ae537ceb..5ffe4bb91 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_aged_creditors_report.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_aged_creditors_report.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import agedcreditorreport as shared_agedcreditorreport -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from datetime import date from typing import Optional @@ -30,8 +30,8 @@ class GetAgedCreditorsReportResponse: status_code: int = dataclasses.field() aged_creditor_report: Optional[shared_agedcreditorreport.AgedCreditorReport] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_aged_debtors_report.py b/previous-versions/accounting/src/codataccounting/models/operations/get_aged_debtors_report.py index 9505511ab..8db267e2b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_aged_debtors_report.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_aged_debtors_report.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import ageddebtorreport as shared_ageddebtorreport -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from datetime import date from typing import Optional @@ -30,8 +30,8 @@ class GetAgedDebtorsReportResponse: status_code: int = dataclasses.field() aged_debtor_report: Optional[shared_ageddebtorreport.AgedDebtorReport] = dataclasses.field(default=None) r"""OK""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_balance_sheet.py b/previous-versions/accounting/src/codataccounting/models/operations/get_balance_sheet.py index d69f7f11f..168c552bb 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_balance_sheet.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_balance_sheet.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import balancesheet1 as shared_balancesheet1 -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -23,21 +21,6 @@ class GetBalanceSheetRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetBalanceSheet409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetBalanceSheetResponse: @@ -45,10 +28,8 @@ class GetBalanceSheetResponse: status_code: int = dataclasses.field() balance_sheet: Optional[shared_balancesheet1.BalanceSheet1] = dataclasses.field(default=None) r"""Success""" - get_balance_sheet_409_application_json_object: Optional[GetBalanceSheet409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_bank_account.py b/previous-versions/accounting/src/codataccounting/models/operations/get_bank_account.py index d38c9bf5c..963b4a33f 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_bank_account.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_bank_account.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import bankaccount as shared_bankaccount -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -21,21 +19,6 @@ class GetBankAccountRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetBankAccount409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetBankAccountResponse: @@ -43,10 +26,8 @@ class GetBankAccountResponse: status_code: int = dataclasses.field() bank_account: Optional[shared_bankaccount.BankAccount] = dataclasses.field(default=None) r"""Success""" - get_bank_account_409_application_json_object: Optional[GetBankAccount409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_bill.py b/previous-versions/accounting/src/codataccounting/models/operations/get_bill.py index c2a9f5af1..a0e579d1d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_bill.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_bill.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import bill as shared_bill -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -20,21 +18,6 @@ class GetBillRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetBill409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetBillResponse: @@ -42,10 +25,8 @@ class GetBillResponse: status_code: int = dataclasses.field() bill: Optional[shared_bill.Bill] = dataclasses.field(default=None) r"""Success""" - get_bill_409_application_json_object: Optional[GetBill409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_bill_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/get_bill_attachment.py index b8dd28724..7e1360530 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_bill_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_bill_attachment.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachment as shared_attachment -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -28,8 +28,8 @@ class GetBillAttachmentResponse: status_code: int = dataclasses.field() attachment: Optional[shared_attachment.Attachment] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_bill_credit_note.py b/previous-versions/accounting/src/codataccounting/models/operations/get_bill_credit_note.py index 154827624..35bfcd13e 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_bill_credit_note.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_bill_credit_note.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import billcreditnote as shared_billcreditnote -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -19,21 +17,6 @@ class GetBillCreditNoteRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetBillCreditNote409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetBillCreditNoteResponse: @@ -41,10 +24,8 @@ class GetBillCreditNoteResponse: status_code: int = dataclasses.field() bill_credit_note: Optional[shared_billcreditnote.BillCreditNote] = dataclasses.field(default=None) r"""Success""" - get_bill_credit_note_409_application_json_object: Optional[GetBillCreditNote409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_bill_payments.py b/previous-versions/accounting/src/codataccounting/models/operations/get_bill_payments.py index 8489a6d4e..d1d1d43a3 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_bill_payments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_bill_payments.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import billpayment as shared_billpayment -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -19,21 +17,6 @@ class GetBillPaymentsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetBillPayments409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetBillPaymentsResponse: @@ -41,10 +24,8 @@ class GetBillPaymentsResponse: status_code: int = dataclasses.field() bill_payment: Optional[shared_billpayment.BillPayment] = dataclasses.field(default=None) r"""Success""" - get_bill_payments_409_application_json_object: Optional[GetBillPayments409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_cash_flow_statement.py b/previous-versions/accounting/src/codataccounting/models/operations/get_cash_flow_statement.py index 3805da27a..c3200e67b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_cash_flow_statement.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_cash_flow_statement.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import cashflowstatement1 as shared_cashflowstatement1 -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -23,21 +21,6 @@ class GetCashFlowStatementRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetCashFlowStatement409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetCashFlowStatementResponse: @@ -45,10 +28,8 @@ class GetCashFlowStatementResponse: status_code: int = dataclasses.field() cash_flow_statement: Optional[shared_cashflowstatement1.CashFlowStatement1] = dataclasses.field(default=None) r"""Success""" - get_cash_flow_statement_409_application_json_object: Optional[GetCashFlowStatement409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_company_info.py b/previous-versions/accounting/src/codataccounting/models/operations/get_company_info.py index 30f378fe2..140b04650 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_company_info.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_company_info.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import companydataset as shared_companydataset -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -18,21 +16,6 @@ class GetCompanyInfoRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetCompanyInfo409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetCompanyInfoResponse: @@ -40,10 +23,8 @@ class GetCompanyInfoResponse: status_code: int = dataclasses.field() company_dataset: Optional[shared_companydataset.CompanyDataset] = dataclasses.field(default=None) r"""Success""" - get_company_info_409_application_json_object: Optional[GetCompanyInfo409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_bank_transactions_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_bank_transactions_model.py index 1786fae8b..2ac171766 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_bank_transactions_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_bank_transactions_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -24,10 +24,10 @@ class GetCreateBankTransactionsModelRequest: class GetCreateBankTransactionsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_billpayments_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_billpayments_model.py index bfc2a644e..4a4e5f10d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_billpayments_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_billpayments_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateBillPaymentsModelRequest: class GetCreateBillPaymentsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_chartofaccounts_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_chartofaccounts_model.py index e78ae60c8..07630f5d8 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_chartofaccounts_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_chartofaccounts_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateChartOfAccountsModelRequest: class GetCreateChartOfAccountsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_directcosts_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_directcosts_model.py index 898ecc584..bb922c51a 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_directcosts_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_directcosts_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateDirectCostsModelRequest: class GetCreateDirectCostsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_directincomes_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_directincomes_model.py index c81cbdd42..3b000902b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_directincomes_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_directincomes_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateDirectIncomesModelRequest: class GetCreateDirectIncomesModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_items_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_items_model.py index 9c0a78a89..34cad4f54 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_items_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_items_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateItemsModelRequest: class GetCreateItemsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_journalentries_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_journalentries_model.py index 9d31c11fb..a17ccd4cf 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_journalentries_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_journalentries_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateJournalEntriesModelRequest: class GetCreateJournalEntriesModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_journals_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_journals_model.py index 6fce8648b..793eab2fb 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_journals_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_journals_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateJournalsModelRequest: class GetCreateJournalsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_payments_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_payments_model.py index a4b65b379..783e5f16d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_payments_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_payments_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreatePaymentsModelRequest: class GetCreatePaymentsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_transfers_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_transfers_model.py index dd83fe876..20d6781c8 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_transfers_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_transfers_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateTransfersModelRequest: class GetCreateTransfersModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_bankaccounts_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_bankaccounts_model.py index 328cd54d3..8ba2b0b53 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_bankaccounts_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_bankaccounts_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateUpdateBankAccountsModelRequest: class GetCreateUpdateBankAccountsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_billcreditnotes_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_billcreditnotes_model.py index df68e3e9f..f8fed939f 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_billcreditnotes_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_billcreditnotes_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateUpdateBillCreditNotesModelRequest: class GetCreateUpdateBillCreditNotesModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_bills_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_bills_model.py index 5caed5a44..549567323 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_bills_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_bills_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateUpdateBillsModelRequest: class GetCreateUpdateBillsModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_creditnotes_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_creditnotes_model.py index e3f8ad2e4..6325431fa 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_creditnotes_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_creditnotes_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateUpdateCreditNotesModelRequest: class GetCreateUpdateCreditNotesModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_customers_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_customers_model.py index 8a9834035..34cd61ca1 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_customers_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_customers_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateUpdateCustomersModelRequest: class GetCreateUpdateCustomersModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_invoices_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_invoices_model.py index 6a4c0ba76..0e8ac40e5 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_invoices_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_invoices_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateUpdateInvoicesModelRequest: class GetCreateUpdateInvoicesModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_purchaseorders_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_purchaseorders_model.py index e7c14a16a..7193abc56 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_purchaseorders_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_purchaseorders_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateUpdatePurchaseOrdersModelRequest: class GetCreateUpdatePurchaseOrdersModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_suppliers_model.py b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_suppliers_model.py index 909f79650..c1824d3a1 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_suppliers_model.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_create_update_suppliers_model.py @@ -3,8 +3,8 @@ 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 ..shared import schema as shared_schema from typing import Optional @@ -22,10 +22,10 @@ class GetCreateUpdateSuppliersModelRequest: class GetCreateUpdateSuppliersModelResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" push_option: Optional[shared_pushoption.PushOption] = dataclasses.field(default=None) r"""OK""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_credit_note.py b/previous-versions/accounting/src/codataccounting/models/operations/get_credit_note.py index 7fac3153d..1ce6dcc8c 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_credit_note.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_credit_note.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import creditnote as shared_creditnote -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -19,21 +17,6 @@ class GetCreditNoteRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetCreditNote409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetCreditNoteResponse: @@ -41,10 +24,8 @@ class GetCreditNoteResponse: status_code: int = dataclasses.field() credit_note: Optional[shared_creditnote.CreditNote] = dataclasses.field(default=None) r"""Success""" - get_credit_note_409_application_json_object: Optional[GetCreditNote409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_customer.py b/previous-versions/accounting/src/codataccounting/models/operations/get_customer.py index 682072184..079a11848 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_customer.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_customer.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import customer as shared_customer -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -19,21 +17,6 @@ class GetCustomerRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetCustomer409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetCustomerResponse: @@ -41,10 +24,8 @@ class GetCustomerResponse: status_code: int = dataclasses.field() customer: Optional[shared_customer.Customer] = dataclasses.field(default=None) r"""Success""" - get_customer_409_application_json_object: Optional[GetCustomer409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_customer_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/get_customer_attachment.py index a46670a92..31bbd3037 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_customer_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_customer_attachment.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachment as shared_attachment -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,8 +27,8 @@ class GetCustomerAttachmentResponse: status_code: int = dataclasses.field() attachment: Optional[shared_attachment.Attachment] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_direct_cost.py b/previous-versions/accounting/src/codataccounting/models/operations/get_direct_cost.py index 06f526baf..60b949dec 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_direct_cost.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_direct_cost.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import directcost as shared_directcost -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -21,21 +19,6 @@ class GetDirectCostRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetDirectCost409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetDirectCostResponse: @@ -43,10 +26,8 @@ class GetDirectCostResponse: status_code: int = dataclasses.field() direct_cost: Optional[shared_directcost.DirectCost] = dataclasses.field(default=None) r"""Success""" - get_direct_cost_409_application_json_object: Optional[GetDirectCost409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_direct_cost_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/get_direct_cost_attachment.py index b7481c8b4..00b06f544 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_direct_cost_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_direct_cost_attachment.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachment as shared_attachment -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -28,8 +28,8 @@ class GetDirectCostAttachmentResponse: status_code: int = dataclasses.field() attachment: Optional[shared_attachment.Attachment] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_direct_income.py b/previous-versions/accounting/src/codataccounting/models/operations/get_direct_income.py index 85a89a07e..a10f9085b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_direct_income.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_direct_income.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import directincome as shared_directincome -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -20,21 +18,6 @@ class GetDirectIncomeRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetDirectIncome409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetDirectIncomeResponse: @@ -42,10 +25,8 @@ class GetDirectIncomeResponse: status_code: int = dataclasses.field() direct_income: Optional[shared_directincome.DirectIncome] = dataclasses.field(default=None) r"""Success""" - get_direct_income_409_application_json_object: Optional[GetDirectIncome409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_direct_income_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/get_direct_income_attachment.py index 15348c6c1..6c996b689 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_direct_income_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_direct_income_attachment.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachment as shared_attachment -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -29,8 +29,8 @@ class GetDirectIncomeAttachmentResponse: status_code: int = dataclasses.field() attachment: Optional[shared_attachment.Attachment] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_invoice.py b/previous-versions/accounting/src/codataccounting/models/operations/get_invoice.py index d9d60b977..e54f0090d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_invoice.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_invoice.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import invoice as shared_invoice -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -20,32 +18,15 @@ class GetInvoiceRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetInvoice409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetInvoiceResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_invoice_409_application_json_object: Optional[GetInvoice409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" invoice: Optional[shared_invoice.Invoice] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_invoice_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/get_invoice_attachment.py index c16461c28..8b055c16c 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_invoice_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_invoice_attachment.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachment as shared_attachment -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -28,8 +28,8 @@ class GetInvoiceAttachmentResponse: status_code: int = dataclasses.field() attachment: Optional[shared_attachment.Attachment] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_item.py b/previous-versions/accounting/src/codataccounting/models/operations/get_item.py index 7db7ffa6d..37a1a444d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_item.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_item.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import item as shared_item -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,32 +17,15 @@ class GetItemRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetItem409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetItemResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_item_409_application_json_object: Optional[GetItem409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" item: Optional[shared_item.Item] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_journal.py b/previous-versions/accounting/src/codataccounting/models/operations/get_journal.py index d852e3e93..44b3dc054 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_journal.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_journal.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import journal as shared_journal -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,32 +17,15 @@ class GetJournalRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetJournal409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetJournalResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_journal_409_application_json_object: Optional[GetJournal409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" journal: Optional[shared_journal.Journal] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_journal_entry.py b/previous-versions/accounting/src/codataccounting/models/operations/get_journal_entry.py index 9e770caed..23a655c83 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_journal_entry.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_journal_entry.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import journalentry as shared_journalentry -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,32 +17,15 @@ class GetJournalEntryRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetJournalEntry409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetJournalEntryResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_journal_entry_409_application_json_object: Optional[GetJournalEntry409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" journal_entry: Optional[shared_journalentry.JournalEntry] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_payment.py b/previous-versions/accounting/src/codataccounting/models/operations/get_payment.py index 56f5157a9..b0359971f 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_payment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_payment.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import payment as shared_payment -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,32 +17,15 @@ class GetPaymentRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetPayment409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetPaymentResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_payment_409_application_json_object: Optional[GetPayment409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" payment: Optional[shared_payment.Payment] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_payment_method.py b/previous-versions/accounting/src/codataccounting/models/operations/get_payment_method.py index 52cbc734e..e26eb73b5 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_payment_method.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_payment_method.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import paymentmethod as shared_paymentmethod -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,32 +17,15 @@ class GetPaymentMethodRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetPaymentMethod409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetPaymentMethodResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_payment_method_409_application_json_object: Optional[GetPaymentMethod409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" payment_method: Optional[shared_paymentmethod.PaymentMethod] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_profit_and_loss.py b/previous-versions/accounting/src/codataccounting/models/operations/get_profit_and_loss.py index 63032f00a..4f0cd48ee 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_profit_and_loss.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_profit_and_loss.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import profitandlossreport1 as shared_profitandlossreport1 -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -23,32 +21,15 @@ class GetProfitAndLossRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetProfitAndLoss409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetProfitAndLossResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_profit_and_loss_409_application_json_object: Optional[GetProfitAndLoss409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" profit_and_loss_report: Optional[shared_profitandlossreport1.ProfitAndLossReport1] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_purchase_order.py b/previous-versions/accounting/src/codataccounting/models/operations/get_purchase_order.py index 07e8e43c1..cc20825ac 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_purchase_order.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_purchase_order.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import purchaseorder as shared_purchaseorder -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,32 +17,15 @@ class GetPurchaseOrderRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetPurchaseOrder409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetPurchaseOrderResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_purchase_order_409_application_json_object: Optional[GetPurchaseOrder409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" purchase_order: Optional[shared_purchaseorder.PurchaseOrder] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_sales_order.py b/previous-versions/accounting/src/codataccounting/models/operations/get_sales_order.py index ca1a18fc0..04daf6e7e 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_sales_order.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_sales_order.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import salesorder as shared_salesorder -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,32 +17,15 @@ class GetSalesOrderRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetSalesOrder409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetSalesOrderResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_sales_order_409_application_json_object: Optional[GetSalesOrder409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + 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) sales_order: Optional[shared_salesorder.SalesOrder] = dataclasses.field(default=None) r"""Success""" - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your API request was not properly authorized.""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_supplier.py b/previous-versions/accounting/src/codataccounting/models/operations/get_supplier.py index 67cd0b389..0426ef024 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_supplier.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_supplier.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import supplier as shared_supplier -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -20,31 +18,14 @@ class GetSupplierRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetSupplier409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetSupplierResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_supplier_409_application_json_object: Optional[GetSupplier409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) supplier: Optional[shared_supplier.Supplier] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_supplier_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/get_supplier_attachment.py index cfeefcd13..917e9bbe4 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_supplier_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_supplier_attachment.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachment as shared_attachment -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -28,8 +28,8 @@ class GetSupplierAttachmentResponse: status_code: int = dataclasses.field() attachment: Optional[shared_attachment.Attachment] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_tax_rate.py b/previous-versions/accounting/src/codataccounting/models/operations/get_tax_rate.py index 8046bb040..81e481e81 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_tax_rate.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_tax_rate.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import taxrate as shared_taxrate -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,31 +17,14 @@ class GetTaxRateRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetTaxRate409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetTaxRateResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_tax_rate_409_application_json_object: Optional[GetTaxRate409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + 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) tax_rate: Optional[shared_taxrate.TaxRate] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_tracking_category.py b/previous-versions/accounting/src/codataccounting/models/operations/get_tracking_category.py index 5c027fe49..d1da67cec 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_tracking_category.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_tracking_category.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import trackingcategorytree as shared_trackingcategorytree -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -19,31 +17,14 @@ class GetTrackingCategoryRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetTrackingCategory409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetTrackingCategoryResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_tracking_category_409_application_json_object: Optional[GetTrackingCategory409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + 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) tracking_category_tree: Optional[shared_trackingcategorytree.TrackingCategoryTree] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/get_transfer.py b/previous-versions/accounting/src/codataccounting/models/operations/get_transfer.py index 312a8d7df..c26f7bfe3 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/get_transfer.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/get_transfer.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import transfer as shared_transfer -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -20,31 +18,14 @@ class GetTransferRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class GetTransfer409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class GetTransferResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - get_transfer_409_application_json_object: Optional[GetTransfer409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + 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) transfer: Optional[shared_transfer.Transfer] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_account_transactions.py b/previous-versions/accounting/src/codataccounting/models/operations/list_account_transactions.py index 85a3f485d..5f01624ec 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_account_transactions.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_account_transactions.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import accounttransactions as shared_accounttransactions -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,21 +25,6 @@ class ListAccountTransactionsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListAccountTransactions409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListAccountTransactionsResponse: @@ -49,10 +32,8 @@ class ListAccountTransactionsResponse: status_code: int = dataclasses.field() account_transactions: Optional[shared_accounttransactions.AccountTransactions] = dataclasses.field(default=None) r"""Success""" - list_account_transactions_409_application_json_object: Optional[ListAccountTransactions409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_accounts.py b/previous-versions/accounting/src/codataccounting/models/operations/list_accounts.py index e2057a6e1..4e7157fb2 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_accounts.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_accounts.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import accounts as shared_accounts -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,21 +24,6 @@ class ListAccountsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListAccounts409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListAccountsResponse: @@ -48,10 +31,8 @@ class ListAccountsResponse: status_code: int = dataclasses.field() accounts: Optional[shared_accounts.Accounts] = dataclasses.field(default=None) r"""Success""" - list_accounts_409_application_json_object: Optional[ListAccounts409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_bank_account_transactions.py b/previous-versions/accounting/src/codataccounting/models/operations/list_bank_account_transactions.py index 10457dabf..e46a47ffd 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_bank_account_transactions.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_bank_account_transactions.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import banktransactionsresponse as shared_banktransactionsresponse -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import banktransactions as shared_banktransactions +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -29,32 +27,15 @@ class ListBankAccountTransactionsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListBankAccountTransactions409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListBankAccountTransactionsResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - bank_transactions_response: Optional[shared_banktransactionsresponse.BankTransactionsResponse] = dataclasses.field(default=None) + bank_transactions: Optional[shared_banktransactions.BankTransactions] = dataclasses.field(default=None) r"""Success""" - list_bank_account_transactions_409_application_json_object: Optional[ListBankAccountTransactions409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_bank_accounts.py b/previous-versions/accounting/src/codataccounting/models/operations/list_bank_accounts.py index b4f8adf2f..7eb16eddc 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_bank_accounts.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_bank_accounts.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import bankaccounts as shared_bankaccounts -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,21 +25,6 @@ class ListBankAccountsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListBankAccounts409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListBankAccountsResponse: @@ -49,10 +32,8 @@ class ListBankAccountsResponse: status_code: int = dataclasses.field() bank_accounts: Optional[shared_bankaccounts.BankAccounts] = dataclasses.field(default=None) r"""Success""" - list_bank_accounts_409_application_json_object: Optional[ListBankAccounts409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_bill_attachments.py b/previous-versions/accounting/src/codataccounting/models/operations/list_bill_attachments.py index 55a3eaaf4..23621a39c 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_bill_attachments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_bill_attachments.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachmentsdataset as shared_attachmentsdataset -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,8 +26,8 @@ class ListBillAttachmentsResponse: status_code: int = dataclasses.field() attachments_dataset: Optional[shared_attachmentsdataset.AttachmentsDataset] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_bill_credit_notes.py b/previous-versions/accounting/src/codataccounting/models/operations/list_bill_credit_notes.py index a490e0efa..c4bdb3345 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_bill_credit_notes.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_bill_credit_notes.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import billcreditnotes as shared_billcreditnotes -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,21 +24,6 @@ class ListBillCreditNotesRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListBillCreditNotes409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListBillCreditNotesResponse: @@ -48,10 +31,8 @@ class ListBillCreditNotesResponse: status_code: int = dataclasses.field() bill_credit_notes: Optional[shared_billcreditnotes.BillCreditNotes] = dataclasses.field(default=None) r"""Success""" - list_bill_credit_notes_409_application_json_object: Optional[ListBillCreditNotes409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_bill_payments.py b/previous-versions/accounting/src/codataccounting/models/operations/list_bill_payments.py index 811f4b585..411cf85e9 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_bill_payments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_bill_payments.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import billpayments as shared_billpayments -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,21 +24,6 @@ class ListBillPaymentsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListBillPayments409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListBillPaymentsResponse: @@ -48,10 +31,8 @@ class ListBillPaymentsResponse: status_code: int = dataclasses.field() bill_payments: Optional[shared_billpayments.BillPayments] = dataclasses.field(default=None) r"""Success""" - list_bill_payments_409_application_json_object: Optional[ListBillPayments409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_bills.py b/previous-versions/accounting/src/codataccounting/models/operations/list_bills.py index 866b446c8..0a774c61b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_bills.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_bills.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import bills as shared_bills -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,21 +24,6 @@ class ListBillsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListBills409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListBillsResponse: @@ -48,10 +31,8 @@ class ListBillsResponse: status_code: int = dataclasses.field() bills: Optional[shared_bills.Bills] = dataclasses.field(default=None) r"""Success""" - list_bills_409_application_json_object: Optional[ListBills409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_credit_notes.py b/previous-versions/accounting/src/codataccounting/models/operations/list_credit_notes.py index 11695e413..9cf88c562 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_credit_notes.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_credit_notes.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import creditnotes as shared_creditnotes -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,21 +24,6 @@ class ListCreditNotesRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListCreditNotes409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListCreditNotesResponse: @@ -48,10 +31,8 @@ class ListCreditNotesResponse: status_code: int = dataclasses.field() credit_notes: Optional[shared_creditnotes.CreditNotes] = dataclasses.field(default=None) r"""Success""" - list_credit_notes_409_application_json_object: Optional[ListCreditNotes409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_customer_attachments.py b/previous-versions/accounting/src/codataccounting/models/operations/list_customer_attachments.py index f43afc6f7..736432916 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_customer_attachments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_customer_attachments.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachmentsdataset as shared_attachmentsdataset -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -25,8 +25,8 @@ class ListCustomerAttachmentsResponse: status_code: int = dataclasses.field() attachments_dataset: Optional[shared_attachmentsdataset.AttachmentsDataset] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_customers.py b/previous-versions/accounting/src/codataccounting/models/operations/list_customers.py index 2a4addf41..78113fd57 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_customers.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_customers.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import customers as shared_customers -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,21 +24,6 @@ class ListCustomersRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListCustomers409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListCustomersResponse: @@ -48,10 +31,8 @@ class ListCustomersResponse: status_code: int = dataclasses.field() customers: Optional[shared_customers.Customers] = dataclasses.field(default=None) r"""Success""" - list_customers_409_application_json_object: Optional[ListCustomers409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_direct_cost_attachments.py b/previous-versions/accounting/src/codataccounting/models/operations/list_direct_cost_attachments.py index 3664cd789..d9f6cdb00 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_direct_cost_attachments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_direct_cost_attachments.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachmentsdataset as shared_attachmentsdataset -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,8 +26,8 @@ class ListDirectCostAttachmentsResponse: status_code: int = dataclasses.field() attachments_dataset: Optional[shared_attachmentsdataset.AttachmentsDataset] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_direct_costs.py b/previous-versions/accounting/src/codataccounting/models/operations/list_direct_costs.py index f84497f71..d7f6e637d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_direct_costs.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_direct_costs.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import directcosts as shared_directcosts -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,21 +25,6 @@ class ListDirectCostsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListDirectCosts409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListDirectCostsResponse: @@ -49,10 +32,8 @@ class ListDirectCostsResponse: status_code: int = dataclasses.field() direct_costs: Optional[shared_directcosts.DirectCosts] = dataclasses.field(default=None) r"""Success""" - list_direct_costs_409_application_json_object: Optional[ListDirectCosts409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_direct_income_attachments.py b/previous-versions/accounting/src/codataccounting/models/operations/list_direct_income_attachments.py index 966efd21c..a26aac08a 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_direct_income_attachments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_direct_income_attachments.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachmentsdataset as shared_attachmentsdataset -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,8 +26,8 @@ class ListDirectIncomeAttachmentsResponse: status_code: int = dataclasses.field() attachments_dataset: Optional[shared_attachmentsdataset.AttachmentsDataset] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_direct_incomes.py b/previous-versions/accounting/src/codataccounting/models/operations/list_direct_incomes.py index 011ec6e5e..8a121587b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_direct_incomes.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_direct_incomes.py @@ -4,9 +4,7 @@ import dataclasses import requests as requests_http from ..shared import directincomes as shared_directincomes -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -27,21 +25,6 @@ class ListDirectIncomesRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListDirectIncomes409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListDirectIncomesResponse: @@ -49,10 +32,8 @@ class ListDirectIncomesResponse: status_code: int = dataclasses.field() direct_incomes: Optional[shared_directincomes.DirectIncomes] = dataclasses.field(default=None) r"""Success""" - list_direct_incomes_409_application_json_object: Optional[ListDirectIncomes409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_invoice_attachments.py b/previous-versions/accounting/src/codataccounting/models/operations/list_invoice_attachments.py index 6010e669c..e6a698ec9 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_invoice_attachments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_invoice_attachments.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachmentsdataset as shared_attachmentsdataset -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,8 +26,8 @@ class ListInvoiceAttachmentsResponse: status_code: int = dataclasses.field() attachments_dataset: Optional[shared_attachmentsdataset.AttachmentsDataset] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_invoices.py b/previous-versions/accounting/src/codataccounting/models/operations/list_invoices.py index ea2335eb4..9b7c7a3f0 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_invoices.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_invoices.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import invoices as shared_invoices -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,32 +24,15 @@ class ListInvoicesRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListInvoices409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListInvoicesResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your `query` parameter was not correctly formed""" invoices: Optional[shared_invoices.Invoices] = dataclasses.field(default=None) r"""Success""" - list_invoices_409_application_json_object: Optional[ListInvoices409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_items.py b/previous-versions/accounting/src/codataccounting/models/operations/list_items.py index 0c6ae0c6e..db0f8a1d5 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_items.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_items.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import items1 as shared_items1 -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,32 +24,15 @@ class ListItemsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListItems409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListItemsResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your `query` parameter was not correctly formed""" items: Optional[shared_items1.Items1] = dataclasses.field(default=None) r"""Success""" - list_items_409_application_json_object: Optional[ListItems409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_journal_entries.py b/previous-versions/accounting/src/codataccounting/models/operations/list_journal_entries.py index 850862383..dd3b682d9 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_journal_entries.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_journal_entries.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import journalentries as shared_journalentries -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,32 +24,15 @@ class ListJournalEntriesRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListJournalEntries409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListJournalEntriesResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your `query` parameter was not correctly formed""" journal_entries: Optional[shared_journalentries.JournalEntries] = dataclasses.field(default=None) r"""Success""" - list_journal_entries_409_application_json_object: Optional[ListJournalEntries409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_journals.py b/previous-versions/accounting/src/codataccounting/models/operations/list_journals.py index 04e658258..926e5c4e2 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_journals.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_journals.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import journals as shared_journals -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,32 +24,15 @@ class ListJournalsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListJournals409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListJournalsResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your `query` parameter was not correctly formed""" journals: Optional[shared_journals.Journals] = dataclasses.field(default=None) r"""Success""" - list_journals_409_application_json_object: Optional[ListJournals409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_payment_methods.py b/previous-versions/accounting/src/codataccounting/models/operations/list_payment_methods.py index e9c160841..ba46b0a39 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_payment_methods.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_payment_methods.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import paymentmethods as shared_paymentmethods -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,32 +24,15 @@ class ListPaymentMethodsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListPaymentMethods409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListPaymentMethodsResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - list_payment_methods_409_application_json_object: Optional[ListPaymentMethods409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your `query` parameter was not correctly formed""" payment_methods: Optional[shared_paymentmethods.PaymentMethods] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_payments.py b/previous-versions/accounting/src/codataccounting/models/operations/list_payments.py index fbfd3d367..961cc24dc 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_payments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_payments.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import payments as shared_payments -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,32 +24,15 @@ class ListPaymentsRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListPayments409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListPaymentsResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - list_payments_409_application_json_object: Optional[ListPayments409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your `query` parameter was not correctly formed""" payments: Optional[shared_payments.Payments] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_purchase_orders.py b/previous-versions/accounting/src/codataccounting/models/operations/list_purchase_orders.py index f295179df..0efc101c0 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_purchase_orders.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_purchase_orders.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import purchaseorders as shared_purchaseorders -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,32 +24,15 @@ class ListPurchaseOrdersRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListPurchaseOrders409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListPurchaseOrdersResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - list_purchase_orders_409_application_json_object: Optional[ListPurchaseOrders409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your `query` parameter was not correctly formed""" purchase_orders: Optional[shared_purchaseorders.PurchaseOrders] = dataclasses.field(default=None) r"""Success""" raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_sales_orders.py b/previous-versions/accounting/src/codataccounting/models/operations/list_sales_orders.py index 344c69d70..1b73070e6 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_sales_orders.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_sales_orders.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import salesorders as shared_salesorders -from ..shared import schema as shared_schema -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,32 +24,15 @@ class ListSalesOrdersRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListSalesOrders409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListSalesOrdersResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - list_sales_orders_409_application_json_object: Optional[ListSalesOrders409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" + 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) sales_orders: Optional[shared_salesorders.SalesOrders] = dataclasses.field(default=None) r"""Success""" - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) - r"""Your `query` parameter was not correctly formed""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_supplier_attachments.py b/previous-versions/accounting/src/codataccounting/models/operations/list_supplier_attachments.py index 43bc968c7..a591ae97b 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_supplier_attachments.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_supplier_attachments.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import attachmentsdataset as shared_attachmentsdataset -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -26,8 +26,8 @@ class ListSupplierAttachmentsResponse: status_code: int = dataclasses.field() attachments_dataset: Optional[shared_attachmentsdataset.AttachmentsDataset] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_suppliers.py b/previous-versions/accounting/src/codataccounting/models/operations/list_suppliers.py index 187aa7ddb..952e53c2e 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_suppliers.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_suppliers.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import suppliers as shared_suppliers -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,31 +24,14 @@ class ListSuppliersRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListSuppliers409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListSuppliersResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - list_suppliers_409_application_json_object: Optional[ListSuppliers409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your `query` parameter was not correctly formed""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) suppliers: Optional[shared_suppliers.Suppliers] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_tax_rates.py b/previous-versions/accounting/src/codataccounting/models/operations/list_tax_rates.py index 545dd53a5..2fdeffda2 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_tax_rates.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_tax_rates.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import taxrates as shared_taxrates -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,31 +24,14 @@ class ListTaxRatesRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListTaxRates409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListTaxRatesResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - list_tax_rates_409_application_json_object: Optional[ListTaxRates409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + 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) tax_rates: Optional[shared_taxrates.TaxRates] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_tracking_categories.py b/previous-versions/accounting/src/codataccounting/models/operations/list_tracking_categories.py index 1079894f9..2dfa35e5a 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_tracking_categories.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_tracking_categories.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import trackingcategories as shared_trackingcategories -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -26,31 +24,14 @@ class ListTrackingCategoriesRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListTrackingCategories409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListTrackingCategoriesResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - list_tracking_categories_409_application_json_object: Optional[ListTrackingCategories409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + 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) tracking_categories: Optional[shared_trackingcategories.TrackingCategories] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/list_transfers.py b/previous-versions/accounting/src/codataccounting/models/operations/list_transfers.py index c351f2346..763df4b12 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/list_transfers.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/list_transfers.py @@ -3,10 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import transfers as shared_transfers -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -27,31 +25,14 @@ class ListTransfersRequest: -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ListTransfers409ApplicationJSON: - r"""The data type's dataset has not been requested or is still syncing.""" - can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) - correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) - detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) - error: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error'), 'exclude': lambda f: f is None }}) - service: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service'), 'exclude': lambda f: f is None }}) - status_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode'), 'exclude': lambda f: f is None }}) - - - - @dataclasses.dataclass class ListTransfersResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - list_transfers_409_application_json_object: Optional[ListTransfers409ApplicationJSON] = dataclasses.field(default=None) - r"""The data type's dataset has not been requested or is still syncing.""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + 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) transfers: Optional[shared_transfers.Transfers] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/refresh_company_info.py b/previous-versions/accounting/src/codataccounting/models/operations/refresh_company_info.py index 628c435bd..88ad86852 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/refresh_company_info.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/refresh_company_info.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import dataset as shared_dataset -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -23,8 +23,8 @@ class RefreshCompanyInfoResponse: status_code: int = dataclasses.field() dataset: Optional[shared_dataset.Dataset] = dataclasses.field(default=None) r"""Success""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/update_bank_account.py b/previous-versions/accounting/src/codataccounting/models/operations/update_bank_account.py index 4d4ddbe46..3046767dd 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/update_bank_account.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/update_bank_account.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import bankaccount as shared_bankaccount -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import updatebankaccountresponse as shared_updatebankaccountresponse from typing import Optional @@ -29,9 +29,9 @@ class UpdateBankAccountRequest: class UpdateBankAccountResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) update_bank_account_response: Optional[shared_updatebankaccountresponse.UpdateBankAccountResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/update_bill.py b/previous-versions/accounting/src/codataccounting/models/operations/update_bill.py index bd7cbdd4b..acfa795fc 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/update_bill.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/update_bill.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import bill as shared_bill -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import updatebillresponse as shared_updatebillresponse from typing import Optional @@ -29,9 +29,9 @@ class UpdateBillRequest: class UpdateBillResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) update_bill_response: Optional[shared_updatebillresponse.UpdateBillResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/update_bill_credit_note.py b/previous-versions/accounting/src/codataccounting/models/operations/update_bill_credit_note.py index bc31aed93..f0a2b048d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/update_bill_credit_note.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/update_bill_credit_note.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import billcreditnote as shared_billcreditnote -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import updatebillcreditnoteresponse as shared_updatebillcreditnoteresponse from typing import Optional @@ -28,9 +28,9 @@ class UpdateBillCreditNoteRequest: class UpdateBillCreditNoteResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) update_bill_credit_note_response: Optional[shared_updatebillcreditnoteresponse.UpdateBillCreditNoteResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/update_credit_note.py b/previous-versions/accounting/src/codataccounting/models/operations/update_credit_note.py index c269f12de..528aaa308 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/update_credit_note.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/update_credit_note.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import creditnote as shared_creditnote -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import updatecreditnoteresponse as shared_updatecreditnoteresponse from typing import Optional @@ -28,9 +28,9 @@ class UpdateCreditNoteRequest: class UpdateCreditNoteResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) update_credit_note_response: Optional[shared_updatecreditnoteresponse.UpdateCreditNoteResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/update_customer.py b/previous-versions/accounting/src/codataccounting/models/operations/update_customer.py index 0ad1780ec..0cf11ab9e 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/update_customer.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/update_customer.py @@ -4,7 +4,7 @@ import dataclasses import requests as requests_http from ..shared import customer as shared_customer -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import updatecustomerresponse as shared_updatecustomerresponse from typing import Optional @@ -28,9 +28,9 @@ class UpdateCustomerRequest: class UpdateCustomerResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) update_customer_response: Optional[shared_updatecustomerresponse.UpdateCustomerResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/update_invoice.py b/previous-versions/accounting/src/codataccounting/models/operations/update_invoice.py index 57a63a5d1..2212b814d 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/update_invoice.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/update_invoice.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import invoice as shared_invoice -from ..shared import schema as shared_schema from ..shared import updateinvoiceresponse as shared_updateinvoiceresponse from typing import Optional @@ -29,9 +29,9 @@ class UpdateInvoiceRequest: class UpdateInvoiceResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) update_invoice_response: Optional[shared_updateinvoiceresponse.UpdateInvoiceResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/update_purchase_order.py b/previous-versions/accounting/src/codataccounting/models/operations/update_purchase_order.py index fef52ab29..769fefb8a 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/update_purchase_order.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/update_purchase_order.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses import requests as requests_http +from ..shared import errormessage as shared_errormessage from ..shared import purchaseorder as shared_purchaseorder -from ..shared import schema as shared_schema from ..shared import updatepurchaseorderresponse as shared_updatepurchaseorderresponse from typing import Optional @@ -28,9 +28,9 @@ class UpdatePurchaseOrderRequest: class UpdatePurchaseOrderResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) update_purchase_order_response: Optional[shared_updatepurchaseorderresponse.UpdatePurchaseOrderResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/update_supplier.py b/previous-versions/accounting/src/codataccounting/models/operations/update_supplier.py index 8ece89b1c..2cc2c53a4 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/update_supplier.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/update_supplier.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from ..shared import supplier as shared_supplier from ..shared import updatesupplierresponse as shared_updatesupplierresponse from typing import Optional @@ -29,9 +29,9 @@ class UpdateSupplierRequest: class UpdateSupplierResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""The request made is not valid.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) update_supplier_response: Optional[shared_updatesupplierresponse.UpdateSupplierResponse] = dataclasses.field(default=None) r"""Success""" diff --git a/previous-versions/accounting/src/codataccounting/models/operations/upload_bill_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/upload_bill_attachment.py index b01b1dfd4..16bd4f40f 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/upload_bill_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/upload_bill_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -33,8 +33,8 @@ class UploadBillAttachmentRequest: class UploadBillAttachmentResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/upload_billcreditnote_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/upload_billcreditnote_attachment.py new file mode 100755 index 000000000..0b28f4053 --- /dev/null +++ b/previous-versions/accounting/src/codataccounting/models/operations/upload_billcreditnote_attachment.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +import requests as requests_http +from ..shared import errormessage as shared_errormessage +from typing import Optional + + + +@dataclasses.dataclass +class UploadBillCreditNoteAttachmentRequestBody: + content: bytes = dataclasses.field(metadata={'multipart_form': { 'content': True }}) + request_body: str = dataclasses.field(metadata={'multipart_form': { 'field_name': 'requestBody' }}) + + + + + +@dataclasses.dataclass +class UploadBillCreditNoteAttachmentRequest: + bill_credit_note_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'billCreditNoteId', 'style': 'simple', 'explode': False }}) + company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) + connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }}) + request_body: Optional[UploadBillCreditNoteAttachmentRequestBody] = dataclasses.field(default=None, metadata={'multipart_form': { 'file': True }, 'request': { 'media_type': 'multipart/form-data' }}) + + + + + +@dataclasses.dataclass +class UploadBillCreditNoteAttachmentResponse: + content_type: str = dataclasses.field() + status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + + diff --git a/previous-versions/accounting/src/codataccounting/models/operations/upload_direct_cost_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/upload_direct_cost_attachment.py index d52265e76..0ce86c6df 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/upload_direct_cost_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/upload_direct_cost_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -33,8 +33,8 @@ class UploadDirectCostAttachmentRequest: class UploadDirectCostAttachmentResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/upload_direct_income_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/upload_direct_income_attachment.py index d473879ae..b2e13bf9f 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/upload_direct_income_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/upload_direct_income_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -32,8 +32,8 @@ class UploadDirectIncomeAttachmentRequest: class UploadDirectIncomeAttachmentResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/upload_invoice_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/upload_invoice_attachment.py index ea9491c15..a90a4d89a 100755 --- a/previous-versions/accounting/src/codataccounting/models/operations/upload_invoice_attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/operations/upload_invoice_attachment.py @@ -3,7 +3,7 @@ from __future__ import annotations import dataclasses import requests as requests_http -from ..shared import schema as shared_schema +from ..shared import errormessage as shared_errormessage from typing import Optional @@ -33,8 +33,8 @@ class UploadInvoiceAttachmentRequest: class UploadInvoiceAttachmentResponse: content_type: str = dataclasses.field() status_code: int = dataclasses.field() - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - schema: Optional[shared_schema.Schema] = dataclasses.field(default=None) + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) diff --git a/previous-versions/accounting/src/codataccounting/models/operations/upload_transfer_attachment.py b/previous-versions/accounting/src/codataccounting/models/operations/upload_transfer_attachment.py new file mode 100755 index 000000000..4b5a88cc8 --- /dev/null +++ b/previous-versions/accounting/src/codataccounting/models/operations/upload_transfer_attachment.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +import requests as requests_http +from ..shared import errormessage as shared_errormessage +from typing import Optional + + + +@dataclasses.dataclass +class UploadTransferAttachmentRequestBody: + content: bytes = dataclasses.field(metadata={'multipart_form': { 'content': True }}) + request_body: str = dataclasses.field(metadata={'multipart_form': { 'field_name': 'requestBody' }}) + + + + + +@dataclasses.dataclass +class UploadTransferAttachmentRequest: + company_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'companyId', 'style': 'simple', 'explode': False }}) + connection_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'connectionId', 'style': 'simple', 'explode': False }}) + transfer_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'transferId', 'style': 'simple', 'explode': False }}) + request_body: Optional[UploadTransferAttachmentRequestBody] = dataclasses.field(default=None, metadata={'multipart_form': { 'file': True }, 'request': { 'media_type': 'multipart/form-data' }}) + + + + + +@dataclasses.dataclass +class UploadTransferAttachmentResponse: + content_type: str = dataclasses.field() + status_code: int = dataclasses.field() + error_message: Optional[shared_errormessage.ErrorMessage] = dataclasses.field(default=None) + r"""Your API request was not properly authorized.""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + + diff --git a/previous-versions/accounting/src/codataccounting/models/shared/__init__.py b/previous-versions/accounting/src/codataccounting/models/shared/__init__.py index f916fdc8d..efcac01a2 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/__init__.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/__init__.py @@ -1,6 +1,8 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" from .account import * +from .accountingaddresstype import * +from .accountingcustomerref import * from .accountref import * from .accounts import * from .accountstatus import * @@ -9,12 +11,13 @@ from .accounttransactions import * from .accounttype import * from .addressesitems import * -from .addresstype import * from .agedcreditor import * from .agedcreditorreport import * from .agedcurrencyoutstandingitems import * from .ageddebtor import * from .ageddebtorreport import * +from .agedoutstandingamount import * +from .agedoutstandingamountdetail import * from .attachment import * from .attachmentsdataset import * from .balancesheet import * @@ -23,7 +26,6 @@ from .bankaccountref import * from .bankaccounts import * from .banktransactions import * -from .banktransactionsresponse import * from .banktransactiontype import * from .bill import * from .billcreditnote import * @@ -71,7 +73,6 @@ from .creditnotes import * from .creditnotestatus import * from .customer import * -from .customerref import * from .customers import * from .customerstatus import * from .dataset import * @@ -82,6 +83,7 @@ from .directincome import * from .directincomelineitem import * from .directincomes import * +from .errormessage import * from .halref import * from .invoice import * from .invoiceitem import * @@ -110,7 +112,6 @@ from .paymentlinelink import * from .paymentlinktype import * from .paymentmethod import * -from .paymentmethodref import * from .paymentmethods import * from .paymentmethodstatus import * from .paymentmethodtype import * @@ -148,7 +149,6 @@ from .salesorderref import * from .salesorders import * from .salesorderstatus import * -from .schema import * from .security import * from .shipto import * from .status import * @@ -183,4 +183,4 @@ from .validdatatypelinks import * from .withholdingtaxitems import * -__all__ = ["Account","AccountRef","AccountStatus","AccountTransaction","AccountTransactionLine","AccountTransactionStatus","AccountTransactions","AccountType","Accounts","AddressType","Addressesitems","AgedCreditor","AgedCreditorAgedCurrencyOutstanding","AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmount","AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmountAmountsOutstandingByDataType","AgedCreditorReport","AgedCurrencyOutstandingitems","AgedDebtor","AgedDebtorReport","Attachment","AttachmentsDataset","BalanceSheet","BalanceSheet1","BankAccount","BankAccountBankAccountType","BankAccountRef","BankAccounts","BankTransactionType","BankTransactions","BankTransactionsResponse","Bill","BillCreditNote","BillCreditNoteLineItem","BillCreditNoteLineItemTracking","BillCreditNoteStatus","BillCreditNotes","BillItem","BillLineItem","BillPayment","BillPaymentAllocation","BillPaymentAllocationAllocation","BillPaymentLine","BillPaymentLineLink","BillPaymentLineLinkType","BillPayments","BillStatus","BillSupplementalData","BillWithholdingTax","BilledToType","BilledToType1","Bills","CashFlowStatement","CashFlowStatement1","CompanyDataset","CompanyDatasetAddresses","CompanyDatasetPhone","CompanyDatasetWeblink","CompanyDatasetWeblinkType","Contact","ContactRef","CreateAccountResponse","CreateBankAccountResponse","CreateBankAccountTransaction","CreateBankTransactions","CreateBankTransactionsResponse","CreateBillCreditNoteResponse","CreateBillPaymentResponse","CreateBillResponse","CreateCreditNoteResponse","CreateCustomerResponse","CreateDirectCostResponse","CreateDirectIncomeResponse","CreateInvoiceResponse","CreateItemResponse","CreateJournalEntryResponse","CreateJournalResponse","CreatePaymentResponse","CreatePurchaseOrderResponse","CreateSupplierResponse","CreateTransferResponse","CreditNote","CreditNoteLineItem","CreditNoteLineItemTracking","CreditNoteStatus","CreditNotes","Customer","CustomerRef","CustomerStatus","Customers","DataType","Dataset","DatasetStatus","DirectCost","DirectCostLineItem","DirectCosts","DirectIncome","DirectIncomeLineItem","DirectIncomes","HalRef","Invoice","InvoiceItem","InvoiceLineItem","InvoiceStatus","InvoiceTo","Invoices","Item","ItemRef","ItemStatus","ItemType","Items","Items1","ItemsAgedOutstandingAmount","ItemsAgedOutstandingAmountAmountsOutstandingByDataType","ItemsAllocation","Journal","JournalEntries","JournalEntry","JournalLine","JournalRef","JournalStatus","Journals","Links","Metadata","Payment","PaymentAllocationPayment","PaymentLine","PaymentLineLink","PaymentLinkType","PaymentMethod","PaymentMethodRef","PaymentMethodStatus","PaymentMethodType","PaymentMethods","Payments","PhoneNumberType","PhoneNumbersitems","ProfitAndLossReport","ProfitAndLossReport1","ProjectRef","Propertiestracking","Propertiestracking1","Propertiestracking2","PurchaseOrder","PurchaseOrderLineItem","PurchaseOrderRef","PurchaseOrderStatus","PurchaseOrders","PushChangeType","PushFieldValidation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperationSummary","PushOption","PushOptionChoice","PushOptionProperty","PushOptionType","PushValidationInfo","ReportBasis","ReportInput","ReportLine","SalesOrder","SalesOrderInvoiceStatus","SalesOrderLineItem","SalesOrderLineItemTracking","SalesOrderRef","SalesOrderShipTo","SalesOrderShipToContact","SalesOrderStatus","SalesOrders","Schema","Security","ShipTo","ShipToContact","Status","SupplementalData","Supplier","SupplierRef","SupplierStatus","Suppliers","TaxRate","TaxRateComponent","TaxRateRef","TaxRateStatus","TaxRates","Tracking","TrackingCategories","TrackingCategory","TrackingCategoryRef","TrackingCategoryTree","TrackingRecordReference","Transfer","TransferAccount","TransferContactRef","Transfers","UpdateBankAccountResponse","UpdateBillCreditNoteResponse","UpdateBillResponse","UpdateCreditNoteResponse","UpdateCustomerResponse","UpdateInvoiceResponse","UpdatePurchaseOrderResponse","UpdateSupplierResponse","ValidDataTypeLinks","Validation","ValidationItem","WithholdingTaxitems"] +__all__ = ["Account","AccountRef","AccountStatus","AccountTransaction","AccountTransactionLine","AccountTransactionStatus","AccountTransactions","AccountType","AccountingAddressType","AccountingCustomerRef","Accounts","Addressesitems","AgedCreditor","AgedCreditorAgedCurrencyOutstanding","AgedCreditorReport","AgedCurrencyOutstandingitems","AgedDebtor","AgedDebtorReport","AgedOutstandingAmount","AgedOutstandingAmountDetail","Attachment","AttachmentsDataset","BalanceSheet","BalanceSheet1","BankAccount","BankAccountBankAccountType","BankAccountRef","BankAccounts","BankTransactionType","BankTransactions","BankTransactionsSourceModifiedDate","Bill","BillCreditNote","BillCreditNoteLineItem","BillCreditNoteLineItemTracking","BillCreditNoteStatus","BillCreditNotes","BillItem","BillLineItem","BillPayment","BillPaymentAllocation","BillPaymentAllocationAllocation","BillPaymentLine","BillPaymentLineLink","BillPaymentLineLinkType","BillPayments","BillStatus","BillSupplementalData","BillWithholdingTax","BilledToType","BilledToType1","Bills","CashFlowStatement","CashFlowStatement1","CompanyDataset","CompanyDatasetAccountingAddress","CompanyDatasetPhone","CompanyDatasetWeblink","CompanyDatasetWeblinkType","Contact","ContactRef","CreateAccountResponse","CreateBankAccountResponse","CreateBankAccountTransaction","CreateBankTransactions","CreateBankTransactionsResponse","CreateBillCreditNoteResponse","CreateBillPaymentResponse","CreateBillResponse","CreateCreditNoteResponse","CreateCustomerResponse","CreateDirectCostResponse","CreateDirectIncomeResponse","CreateInvoiceResponse","CreateItemResponse","CreateJournalEntryResponse","CreateJournalResponse","CreatePaymentResponse","CreatePurchaseOrderResponse","CreateSupplierResponse","CreateTransferResponse","CreditNote","CreditNoteLineItem","CreditNoteLineItemTracking","CreditNoteStatus","CreditNotes","Customer","CustomerStatus","Customers","DataType","Dataset","DatasetStatus","DirectCost","DirectCostLineItem","DirectCosts","DirectIncome","DirectIncomeLineItem","DirectIncomes","ErrorMessage","HalRef","Invoice","InvoiceItem","InvoiceLineItem","InvoiceStatus","InvoiceTo","Invoices","Item","ItemRef","ItemStatus","ItemType","Items","Items1","ItemsAllocation","Journal","JournalEntries","JournalEntry","JournalLine","JournalRef","JournalStatus","Journals","Links","Metadata","Payment","PaymentAllocationPayment","PaymentLine","PaymentLineLink","PaymentLinkType","PaymentMethod","PaymentMethodStatus","PaymentMethodType","PaymentMethods","Payments","PhoneNumberType","PhoneNumbersitems","ProfitAndLossReport","ProfitAndLossReport1","ProjectRef","Propertiestracking","Propertiestracking1","Propertiestracking2","PurchaseOrder","PurchaseOrderLineItem","PurchaseOrderRef","PurchaseOrderStatus","PurchaseOrders","PushChangeType","PushFieldValidation","PushOperationChange","PushOperationRef","PushOperationStatus","PushOperationSummary","PushOption","PushOptionChoice","PushOptionProperty","PushOptionType","PushValidationInfo","ReportBasis","ReportInput","ReportLine","SalesOrder","SalesOrderInvoiceStatus","SalesOrderLineItem","SalesOrderLineItemTracking","SalesOrderRef","SalesOrderShipTo","SalesOrderShipToContact","SalesOrderStatus","SalesOrders","Security","ShipTo","ShipToContact","Status","SupplementalData","Supplier","SupplierRef","SupplierStatus","Suppliers","TaxRate","TaxRateComponent","TaxRateRef","TaxRateStatus","TaxRates","Tracking","TrackingCategories","TrackingCategory","TrackingCategoryRef","TrackingCategoryTree","TrackingRecordReference","Transfer","TransferAccount","TransferContactRef","Transfers","UpdateBankAccountResponse","UpdateBillCreditNoteResponse","UpdateBillResponse","UpdateCreditNoteResponse","UpdateCustomerResponse","UpdateInvoiceResponse","UpdatePurchaseOrderResponse","UpdateSupplierResponse","ValidDataTypeLinks","Validation","ValidationItem","WithholdingTaxitems"] diff --git a/previous-versions/accounting/src/codataccounting/models/shared/account.py b/previous-versions/accounting/src/codataccounting/models/shared/account.py index 59eab96d5..2d192bfb9 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/account.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/account.py @@ -8,6 +8,7 @@ from ..shared import validdatatypelinks as shared_validdatatypelinks from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -16,56 +17,62 @@ @dataclasses.dataclass class Account: r"""> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. - + View the coverage for accounts in the Data coverage explorer. - + ## Overview - + Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company. - + The categories for an account include: * Asset * Expense * Income * Liability * Equity. - + + The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. + + At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. + + To determine the list of allowed categories for a specific integration, you can: + - Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model). + - Refer to the integration's own documentation. + > **Accounts with no category** > > If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`. > > This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports. """ - is_bank_account: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBankAccount') }}) - r"""Confirms whether the account is a bank account or not.""" - status: shared_accountstatus.AccountStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) - r"""Status of the account""" - type: shared_accounttype.AccountType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - r"""Type of account""" currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - + ## Unknown currencies - + In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. - + There are only a very small number of edge cases where this currency code is returned by the Codat system. """ - current_balance: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentBalance'), 'exclude': lambda f: f is None }}) + current_balance: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentBalance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Current balance in the account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Description for the account.""" fully_qualified_category: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fullyQualifiedCategory'), 'exclude': lambda f: f is None }}) - r"""Full category of the account. For example: - Liability.Current or Income.Revenue. See example data. + r"""Full category of the account. + + For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation. """ fully_qualified_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fullyQualifiedName'), 'exclude': lambda f: f is None }}) r"""Full name of the account, for example: - - `Liability.Current.VAT` - - `Income.Revenue.Sales` + - `Cash On Hand` + - `Rents Held In Trust` + - `Fixed Asset` """ id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""Identifier for the account, unique for the company.""" + is_bank_account: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBankAccount'), 'exclude': lambda f: f is None }}) + r"""Confirms whether the account is a bank account or not.""" metadata: Optional[shared_metadata.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 }}) name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) @@ -73,6 +80,10 @@ class Account: nominal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nominalCode'), 'exclude': lambda f: f is None }}) r"""Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) + status: Optional[shared_accountstatus.AccountStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + r"""Status of the account""" + type: Optional[shared_accounttype.AccountType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type'), 'exclude': lambda f: f is None }}) + r"""Type of account""" valid_datatype_links: Optional[list[shared_validdatatypelinks.ValidDataTypeLinks]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validDatatypeLinks'), 'exclude': lambda f: f is None }}) r"""The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/accounting-api#/schemas/ValidDataTypeLinks).""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/addresstype.py b/previous-versions/accounting/src/codataccounting/models/shared/accountingaddresstype.py similarity index 85% rename from previous-versions/accounting/src/codataccounting/models/shared/addresstype.py rename to previous-versions/accounting/src/codataccounting/models/shared/accountingaddresstype.py index 4353fa624..d8bad9974 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/addresstype.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/accountingaddresstype.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class AddressType(str, Enum): +class AccountingAddressType(str, Enum): r"""The type of the address""" UNKNOWN = 'Unknown' BILLING = 'Billing' diff --git a/previous-versions/accounting/src/codataccounting/models/shared/customerref.py b/previous-versions/accounting/src/codataccounting/models/shared/accountingcustomerref.py similarity index 96% rename from previous-versions/accounting/src/codataccounting/models/shared/customerref.py rename to previous-versions/accounting/src/codataccounting/models/shared/accountingcustomerref.py index 021b19bd6..18c6626a4 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/customerref.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/accountingcustomerref.py @@ -10,7 +10,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class CustomerRef: +class AccountingCustomerRef: id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) r"""`id` from the Customers data type""" company_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyName'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/accounts.py b/previous-versions/accounting/src/codataccounting/models/shared/accounts.py index 77db88ce7..983be367b 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/accounts.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/accounts.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Accounts: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/accounttransaction.py b/previous-versions/accounting/src/codataccounting/models/shared/accounttransaction.py index 2746b969f..acc88dc87 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/accounttransaction.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/accounttransaction.py @@ -7,6 +7,7 @@ from ..shared import metadata as shared_metadata from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from enum import Enum from typing import Optional @@ -23,55 +24,55 @@ class AccountTransactionStatus(str, Enum): @dataclasses.dataclass class AccountTransaction: r"""> **Language tip:** In Codat, account transactions represent all transactions posted to a bank account within an accounting platform. For bank transactions posted within a banking platform, refer to [Banking transactions](https://docs.codat.io/banking-api#/operations/list-all-banking-transactions). - + > View the coverage for account transactions in the Data coverage explorer. - + ## Overview - + In Codat’s data model, account transactions represent bank activity within an accounting platform. All transactions that go through a bank account are recorded as account transactions. - + Account transactions are created as a result of different business activities, for example: - + * Payments: for example, receiving money for payment against an invoice. * Bill payments: for example, spending money for a payment against a bill. * Direct costs: for example, withdrawing money from a bank account, either for cash purposes or to make a payment. * Direct incomes: for example, selling an item directly to a contact and receiving payment at point of sale. * Transfers: for example, transferring money between two bank accounts. - + Account transactions is the parent data type of [payments](https://docs.codat.io/accounting-api#/schemas/Payment), [bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment), [direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost), [direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome), and [transfers](https://docs.codat.io/accounting-api#/schemas/Transfer). """ bank_account_ref: Optional[shared_bankaccountref.BankAccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('bankAccountRef'), 'exclude': lambda f: f is None }}) r"""Links to the Account transactions data type.""" 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -80,20 +81,20 @@ class AccountTransaction: """ date_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('date'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -110,7 +111,7 @@ class AccountTransaction: 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[AccountTransactionStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""The status of the account transaction.""" - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the account transactions, inclusive of tax.""" transaction_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('transactionId'), 'exclude': lambda f: f is None }}) r"""Identifier of the transaction (unique to the company).""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/accounttransactionline.py b/previous-versions/accounting/src/codataccounting/models/shared/accounttransactionline.py index 3f20278b9..07b83b328 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/accounttransactionline.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/accounttransactionline.py @@ -5,6 +5,7 @@ from ..shared import invoiceto as shared_invoiceto from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -12,19 +13,14 @@ @dataclasses.dataclass class AccountTransactionLine: - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) + amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount in the bill payment currency.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Description of the account transaction.""" record_ref: Optional[shared_invoiceto.InvoiceTo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }}) - r"""Links to the underlying record or data type. - - Found on: - - - Journal entries - - Account transactions - - Invoices - - Transfers + r"""Links the current record to the underlying record or data type that created it. + + For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/accounttransactions.py b/previous-versions/accounting/src/codataccounting/models/shared/accounttransactions.py index 00ddcdb31..b787111a3 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/accounttransactions.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/accounttransactions.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class AccountTransactions: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/addressesitems.py b/previous-versions/accounting/src/codataccounting/models/shared/addressesitems.py index a74c84d3c..c9eb274d6 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/addressesitems.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/addressesitems.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import addresstype as shared_addresstype +from ..shared import accountingaddresstype as shared_accountingaddresstype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional @@ -12,7 +12,7 @@ @dataclasses.dataclass class Addressesitems: - type: shared_addresstype.AddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + type: shared_accountingaddresstype.AccountingAddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The type of the address""" city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city'), 'exclude': lambda f: f is None }}) r"""City of the customer address.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/agedcreditor.py b/previous-versions/accounting/src/codataccounting/models/shared/agedcreditor.py index 48f9059c4..d24ddc6fa 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/agedcreditor.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/agedcreditor.py @@ -2,90 +2,25 @@ from __future__ import annotations import dataclasses +from ..shared import agedoutstandingamount as shared_agedoutstandingamount from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmountAmountsOutstandingByDataType: - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) - r"""The amount outstanding.""" - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - r"""Name of data type with outstanding amount for given period.""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmount: - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) - r"""The amount outstanding.""" - details: Optional[list[AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmountAmountsOutstandingByDataType]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('details'), 'exclude': lambda f: f is None }}) - r"""Array of details.""" - from_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fromDate'), 'exclude': lambda f: f is None }}) - r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - - ``` - 2020-10-08T22:40:50Z - 2021-01-01T00:00:00 - ``` - - - - When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - - - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - - Unqualified local time: `2021-11-15T01:00:00` - - UTC time offsets: `2021-11-15T01:00:00-05:00` - - > Time zones - > - > Not all dates from Codat will contain information about time zones. - > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - """ - to_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('toDate'), 'exclude': lambda f: f is None }}) - r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - - ``` - 2020-10-08T22:40:50Z - 2021-01-01T00:00:00 - ``` - - - - When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - - - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - - Unqualified local time: `2021-11-15T01:00:00` - - UTC time offsets: `2021-11-15T01:00:00-05:00` - - > Time zones - > - > Not all dates from Codat will contain information about time zones. - > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - """ - - - - @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AgedCreditorAgedCurrencyOutstanding: - aged_outstanding_amounts: Optional[list[AgedCreditorAgedCurrencyOutstandingAgedOutstandingAmount]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('agedOutstandingAmounts'), 'exclude': lambda f: f is None }}) + aged_outstanding_amounts: Optional[list[shared_agedoutstandingamount.AgedOutstandingAmount]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('agedOutstandingAmounts'), 'exclude': lambda f: f is None }}) r"""Array of outstanding amounts by period.""" 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. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/agedcreditorreport.py b/previous-versions/accounting/src/codataccounting/models/shared/agedcreditorreport.py index a98a538cd..c76d702e6 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/agedcreditorreport.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/agedcreditorreport.py @@ -13,25 +13,25 @@ @dataclasses.dataclass class AgedCreditorReport: r"""The Aged Creditors report shows the total balance owed by a business to its suppliers over time. - + You can generate it for a company based on recently synced data from your customers' accounting platforms. The report is available in the **Reports** tab in the Codat portal. - + Total assets or liabilities are grouped into 30-day periods for each supplier, up to the current date. You can adjust the report date, period length, and number of periods to show on each report. The data can be grouped by customer or currency. - + > It is not guaranteed that write-offs are included in the Aged Creditors report. - + ## Underlying data - + The Aged Creditors report is generated from a set of required data types: [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier), [Bills](https://docs.codat.io/accounting-api#/schemas/Bill), [Bill credit notes](https://docs.codat.io/accounting-api#/schemas/BillCreditNote), and [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment). - + To generate the report, the underlying data types must have been synced within 24 hours of each other. Otherwise an error is displayed when you try to run the report. Sync the required data types by clicking the link in the error, and then run the report again. - + > The Aged Creditor report runs based on the **issue dates** of the underlying data types rather than the due date. - + ## Accessing the Aged Creditors report in Portal - + Apart from returning the report via the API as JSON and query, you can also return the Aged Creditors report in the Codat portal. - + 1. In the navigation bar, click **Companies**. 2. Click the name of the company you want to generate the report for. The company's data page is displayed. 3. Click the **Accounting** tab then click **Reports**. @@ -42,27 +42,27 @@ class AgedCreditorReport: b. In the **Number of Periods** box, enter the number of periods to show as columns in the report (the default is 4 periods). 6. To run the report, click **Load aged creditors**. 7. The report is generated and displayed at the bottom of the page. - + The report will be grouped per supplier and depending on the periods requested. The details indicates whether the amounts owed come from outstanding bills or bill credit notes. """ data: Optional[list[shared_agedcreditor.AgedCreditor]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""Array of aged creditor.""" generated: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('generated'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -70,20 +70,20 @@ class AgedCreditorReport: """ report_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/agedcurrencyoutstandingitems.py b/previous-versions/accounting/src/codataccounting/models/shared/agedcurrencyoutstandingitems.py index 304ca570f..b462d47a7 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/agedcurrencyoutstandingitems.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/agedcurrencyoutstandingitems.py @@ -2,90 +2,25 @@ from __future__ import annotations import dataclasses +from ..shared import agedoutstandingamount as shared_agedoutstandingamount from codataccounting import utils from dataclasses_json import Undefined, dataclass_json from typing import Optional -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ItemsAgedOutstandingAmountAmountsOutstandingByDataType: - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) - r"""The amount outstanding.""" - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - r"""Name of data type with outstanding amount for given period.""" - - - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class ItemsAgedOutstandingAmount: - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) - r"""The amount outstanding.""" - details: Optional[list[ItemsAgedOutstandingAmountAmountsOutstandingByDataType]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('details'), 'exclude': lambda f: f is None }}) - r"""Array of details.""" - from_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fromDate'), 'exclude': lambda f: f is None }}) - r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - - ``` - 2020-10-08T22:40:50Z - 2021-01-01T00:00:00 - ``` - - - - When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - - - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - - Unqualified local time: `2021-11-15T01:00:00` - - UTC time offsets: `2021-11-15T01:00:00-05:00` - - > Time zones - > - > Not all dates from Codat will contain information about time zones. - > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - """ - to_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('toDate'), 'exclude': lambda f: f is None }}) - r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - - ``` - 2020-10-08T22:40:50Z - 2021-01-01T00:00:00 - ``` - - - - When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - - - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - - Unqualified local time: `2021-11-15T01:00:00` - - UTC time offsets: `2021-11-15T01:00:00-05:00` - - > Time zones - > - > Not all dates from Codat will contain information about time zones. - > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - """ - - - - @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AgedCurrencyOutstandingitems: - aged_outstanding_amounts: Optional[list[ItemsAgedOutstandingAmount]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('agedOutstandingAmounts'), 'exclude': lambda f: f is None }}) + aged_outstanding_amounts: Optional[list[shared_agedoutstandingamount.AgedOutstandingAmount]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('agedOutstandingAmounts'), 'exclude': lambda f: f is None }}) r"""Array of outstanding amounts by period.""" 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. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/ageddebtorreport.py b/previous-versions/accounting/src/codataccounting/models/shared/ageddebtorreport.py index 9f4050454..517499530 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/ageddebtorreport.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/ageddebtorreport.py @@ -13,25 +13,25 @@ @dataclasses.dataclass class AgedDebtorReport: r"""The Aged Debtors report shows the total outstanding balance due from customers to the business over time. - + You can generate it for a company based on recently synced data from your customers' accounting platforms. The report is available in the **Reports** tab in the Codat portal. - + Total assets or liabilities are grouped into 30-day periods for each customer, up to the current date. You can adjust the report date, period length, and number of periods to show on each report. The data can be grouped by customer or currency. - + > It is not guaranteed that write-offs are included in the Aged Debtors report. - + ## Underlying data - + The Aged Debtors report is generated from a set of required data types: [Customers](https://docs.codat.io/accounting-api#/schemas/Customer), [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice), [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote), and [Payments](https://docs.codat.io/accounting-api#/schemas/Payment). - + To generate the report, the underlying data types must have been synced within 24 hours of each other. Otherwise an error is displayed when you try to run the report. Sync the required data types by clicking the link in the error, and then run the report again. - + > The Aged Debtors report runs based on the **issue dates** of the underlying data types rather than the due date. - + ## Accessing the Aged Debtors report in Portal - + Apart from returning the report via the API as JSON and query, you can also return the Aged Debtors report in the Codat portal. - + 1. In the navigation bar, click **Companies**. 2. Click the name of the company you want to generate the report for. The company's data page is displayed. 3. Click the **Accounting** tab then click **Reports**. @@ -42,27 +42,27 @@ class AgedDebtorReport: b. In the **Number of Periods** box, enter the number of periods to show as columns in the report (the default is 4 periods). 6. To run the report, click **Load aged debtors**. 7. The report is generated and displayed at the bottom of the page. - + The report will be grouped per supplier and depending on the periods requested. The details indicates whether the amounts owed come from outstanding invoices or credit notes. """ data: Optional[list[shared_ageddebtor.AgedDebtor]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""Array of aged debtors.""" generated: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('generated'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -70,20 +70,20 @@ class AgedDebtorReport: """ report_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/agedoutstandingamount.py b/previous-versions/accounting/src/codataccounting/models/shared/agedoutstandingamount.py new file mode 100755 index 000000000..3ecd7cedc --- /dev/null +++ b/previous-versions/accounting/src/codataccounting/models/shared/agedoutstandingamount.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from ..shared import agedoutstandingamountdetail as shared_agedoutstandingamountdetail +from codataccounting import utils +from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal +from typing import Optional + + +@dataclass_json(undefined=Undefined.EXCLUDE) + +@dataclasses.dataclass +class AgedOutstandingAmount: + amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) + r"""The amount outstanding.""" + details: Optional[list[shared_agedoutstandingamountdetail.AgedOutstandingAmountDetail]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('details'), 'exclude': lambda f: f is None }}) + r"""Array of details.""" + from_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fromDate'), 'exclude': lambda f: f is None }}) + r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + + ``` + 2020-10-08T22:40:50Z + 2021-01-01T00:00:00 + ``` + + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + - Unqualified local time: `2021-11-15T01:00:00` + - UTC time offsets: `2021-11-15T01:00:00-05:00` + + > Time zones + > + > Not all dates from Codat will contain information about time zones. + > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. + """ + to_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('toDate'), 'exclude': lambda f: f is None }}) + r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + + ``` + 2020-10-08T22:40:50Z + 2021-01-01T00:00:00 + ``` + + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + - Unqualified local time: `2021-11-15T01:00:00` + - UTC time offsets: `2021-11-15T01:00:00-05:00` + + > Time zones + > + > Not all dates from Codat will contain information about time zones. + > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. + """ + + diff --git a/previous-versions/accounting/src/codataccounting/models/shared/paymentmethodref.py b/previous-versions/accounting/src/codataccounting/models/shared/agedoutstandingamountdetail.py similarity index 53% rename from previous-versions/accounting/src/codataccounting/models/shared/paymentmethodref.py rename to previous-versions/accounting/src/codataccounting/models/shared/agedoutstandingamountdetail.py index 19916237d..37858e67a 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/paymentmethodref.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/agedoutstandingamountdetail.py @@ -4,16 +4,17 @@ import dataclasses from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class PaymentMethodRef: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - r"""`id` from the Payment Methods data type""" +class AgedOutstandingAmountDetail: + amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) + r"""The amount outstanding.""" name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - r"""`name` from the Payment Methods data type""" + r"""Name of data type with outstanding amount for given period.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/attachment.py b/previous-versions/accounting/src/codataccounting/models/shared/attachment.py index 7bc4bebe0..3f5e33e9f 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/attachment.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/attachment.py @@ -12,44 +12,44 @@ @dataclasses.dataclass class Attachment: r"""The Codat API supports pulling and pushing of file attachments for invoices, bills, direct costs, and direct incomes. - + > **Retrieving attachments** > > If a company is authorized, you can query the Codat API to read, download, and upload attachments without requiring a fresh sync of data. - + Unlike other data types, Codat doesn't support sync settings for attachments. - + Note that different integrations have different requirements to file size and extension of attachments. - + | Integration | File size | File extension | |-------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| | Xero | 4 MB | 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 | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | | NetSuite | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP | - + View the coverage for accounts in the Data coverage explorer. """ content_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contentType'), 'exclude': lambda f: f is None }}) r"""File type of the attachment. This is represented by appending the file type to the [IETF standard file naming requirements](https://tools.ietf.org/html/rfc6838). For example, for a jpeg file the output is **image/jpeg**. - + Supported file types vary per platform. """ date_created: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dateCreated'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/attachmentsdataset.py b/previous-versions/accounting/src/codataccounting/models/shared/attachmentsdataset.py index 663680fee..46c13710c 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/attachmentsdataset.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/attachmentsdataset.py @@ -12,7 +12,6 @@ @dataclasses.dataclass class AttachmentsDataset: - r"""Success""" attachments: Optional[list[shared_attachment.Attachment]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('attachments'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/balancesheet.py b/previous-versions/accounting/src/codataccounting/models/shared/balancesheet.py index 4babccb34..addb38d97 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/balancesheet.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/balancesheet.py @@ -5,6 +5,7 @@ from ..shared import reportline as shared_reportline from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -12,25 +13,25 @@ @dataclasses.dataclass class BalanceSheet: - net_assets: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netAssets') }}) + net_assets: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netAssets'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Value of net assets for a company in their base currency.""" assets: Optional[shared_reportline.ReportLine] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assets'), 'exclude': lambda f: f is None }}) date_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('date'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/balancesheet1.py b/previous-versions/accounting/src/codataccounting/models/shared/balancesheet1.py index e0aa1519b..ba1091be2 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/balancesheet1.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/balancesheet1.py @@ -13,51 +13,51 @@ @dataclasses.dataclass class BalanceSheet1: r"""> View the coverage for balance sheet in the Data coverage explorer. - + ## Overview - + The balance sheet is a snapshot of a company's accounts at a single point in time that provides a statement of the assets, liabilities and equity of an organization. It gives interested parties an idea of the company's financial position, in addition to displaying what the company owns and owes. - + > **Balance sheet or profit and loss report?** > > A profit and loss report summarises the total revenue, expenses, and profit or loss during a specified time period. A balance sheet report shows the financial position of a company at a specific moment in time. - + **Structure of this report** This report will reflect the structure and line descriptions that the business has set in their own accounting platform. - + **History** By default, Codat pulls (up to) 24 months of balance sheets for a company. You can adjust this to fetch more history, where available, by updating the `monthsToSync` value for `balanceSheet` on the [data type settings endpoint](https://docs.codat.io/codat-api#/operations/update-sync-settings). - + **Want to pull this in a standardised structure?** Our [Enhanced Financials](https://docs.codat.io/assess/enhanced-financials/overview) endpoints provide the same report under standardized headings, allowing you to pull it in the same format for all of your business customers. """ currency: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency') }}) 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. """ reports: list[shared_balancesheet.BalanceSheet] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reports') }}) r"""An array of balance sheet reports.""" earliest_available_month: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('earliestAvailableMonth'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -65,20 +65,20 @@ class BalanceSheet1: """ most_recent_available_month: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mostRecentAvailableMonth'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/bankaccount.py b/previous-versions/accounting/src/codataccounting/models/shared/bankaccount.py index 5871e4604..f5e325f43 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/bankaccount.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/bankaccount.py @@ -5,6 +5,7 @@ from ..shared import metadata as shared_metadata from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from enum import Enum from typing import Optional @@ -27,13 +28,13 @@ class BankAccount: > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. > > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/schemas/Account) - + > View the coverage for bank accounts in the Data coverage explorer. - + ## Overview - + A list of bank accounts associated with a company and a specific data connection. - + Bank accounts data includes: * The name and ID of the account in the accounting platform. * The currency and balance of the account. @@ -43,10 +44,10 @@ class BankAccount: r"""Name of the bank account in the accounting platform.""" account_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountNumber'), 'exclude': lambda f: f is None }}) r"""Account number for the bank account. - + Xero integrations Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated. - + FreeAgent integrations For Credit accounts, only the last four digits are required. For other types, the field is optional. """ @@ -55,17 +56,17 @@ class BankAccount: For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. For Debit accounts, positive balances are assets, and positive transactions **increase** assets. """ - available_balance: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('availableBalance'), 'exclude': lambda f: f is None }}) + available_balance: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('availableBalance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example.""" - balance: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'exclude': lambda f: f is None }}) + balance: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Balance of the bank account.""" currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - + ## 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. """ i_ban: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('iBan'), 'exclude': lambda f: f is None }}) @@ -78,14 +79,14 @@ class BankAccount: modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }}) nominal_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nominalCode'), 'exclude': lambda f: f is None }}) r"""Code used to identify each nominal account for a business.""" - overdraft_limit: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('overdraftLimit'), 'exclude': lambda f: f is None }}) + overdraft_limit: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('overdraftLimit'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Pre-arranged overdraft limit of the account. - + The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. """ sort_code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sortCode'), 'exclude': lambda f: f is None }}) r"""Sort code for the bank account. - + Xero integrations The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/bankaccounts.py b/previous-versions/accounting/src/codataccounting/models/shared/bankaccounts.py index 083d8bfad..e679cb1dd 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/bankaccounts.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/bankaccounts.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class BankAccounts: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/banktransactions.py b/previous-versions/accounting/src/codataccounting/models/shared/banktransactions.py index a6eccd439..228dd6e7e 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/banktransactions.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/banktransactions.py @@ -3,51 +3,53 @@ from __future__ import annotations import dataclasses from ..shared import banktransactiontype as shared_banktransactiontype +from ..shared import links as shared_links from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class BankTransactions: +class BankTransactionsSourceModifiedDate: r"""> **Accessing Bank Accounts through Banking API** > > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. > > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/operations/list-all-banking-transactions) - + > View the coverage for bank transactions in the Data coverage explorer. - + ## Overview - + Transactional banking data for a specific company and account. - + Bank transactions include the: * Amount of the transaction. * Current account balance. * Transaction type, for example, credit, debit, or transfer. """ account_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountId'), 'exclude': lambda f: f is None }}) - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) - balance: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'exclude': lambda f: f is None }}) + amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) + balance: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) cleared_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('clearedOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -62,3 +64,16 @@ class BankTransactions: r"""Type of transaction for the bank statement line""" + + +@dataclass_json(undefined=Undefined.EXCLUDE) + +@dataclasses.dataclass +class BankTransactions: + links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) + page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) + page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) + total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) + results: Optional[list[BankTransactionsSourceModifiedDate]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) + + diff --git a/previous-versions/accounting/src/codataccounting/models/shared/banktransactionsresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/banktransactionsresponse.py deleted file mode 100755 index 790aeb2f5..000000000 --- a/previous-versions/accounting/src/codataccounting/models/shared/banktransactionsresponse.py +++ /dev/null @@ -1,23 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -import dataclasses -from ..shared import banktransactions as shared_banktransactions -from ..shared import links as shared_links -from codataccounting import utils -from dataclasses_json import Undefined, dataclass_json -from typing import Optional - - -@dataclass_json(undefined=Undefined.EXCLUDE) - -@dataclasses.dataclass -class BankTransactionsResponse: - r"""Success""" - links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) - page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) - page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) - total_results: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalResults') }}) - results: Optional[list[shared_banktransactions.BankTransactions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) - - diff --git a/previous-versions/accounting/src/codataccounting/models/shared/bill.py b/previous-versions/accounting/src/codataccounting/models/shared/bill.py index 1edbf284c..6f186e040 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/bill.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/bill.py @@ -10,6 +10,7 @@ from ..shared import supplierref as shared_supplierref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Any, Optional @@ -19,20 +20,20 @@ class BillPaymentAllocationAllocation: allocated_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allocatedOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -40,41 +41,41 @@ class BillPaymentAllocationAllocation: """ 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR. - + Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - + For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - + ## Examples with base currency of GBP - + | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | | :--------------- | :------------- | :------------ | :------------------------- | | **USD** | $20 | 0.781 | £15.62 | | **EUR** | €20 | 0.885 | £17.70 | | **RUB** | ₽20 | 0.011 | £0.22 | - + ## Examples with base currency of USD - + | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | | :--------------- | :------------- | :------------ | :------------------------- | | **GBP** | £20 | 1.277 | $25.54 | | **EUR** | €20 | 1.134 | $22.68 | | **RUB** | ₽20 | 0.015 | $0.30 | """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""The total amount that has been allocated.""" @@ -95,8 +96,8 @@ class BillPaymentAllocation: @dataclasses.dataclass class BillSupplementalData: r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ content: Optional[dict[str, dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is None }}) @@ -107,7 +108,7 @@ class BillSupplementalData: @dataclasses.dataclass class BillWithholdingTax: - amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }}) + amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) @@ -122,62 +123,62 @@ class Bill: > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. > > See [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) for the accounts receivable equivalent of bills. - + View the coverage for bills in the Data coverage explorer. - + ## Overview - + In Codat, a bill contains details of: * When the bill was recorded in the accounting system. * How much the bill is for and the currency of the amount. * Who the bill was received from — the *supplier*. * What the bill is for — the *line items*. - + Some accounting platforms give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. - + You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. """ issue_date: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate') }}) status: shared_billstatus.BillStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Current state of the bill.""" - sub_total: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal') }}) + sub_total: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Total amount of the bill, excluding any taxes.""" - tax_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount') }}) + tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount of tax on the bill.""" - total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }}) + total_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount of the bill, including tax.""" - amount_due: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amountDue'), 'exclude': lambda f: f is None }}) + amount_due: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amountDue'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount outstanding on the bill.""" currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) r"""The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - + ## 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -201,8 +202,8 @@ class Bill: 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[BillSupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ supplier_ref: Optional[shared_supplierref.SupplierRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierRef'), 'exclude': lambda f: f is None }}) r"""Reference to the supplier the record relates to.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billcreditnote.py b/previous-versions/accounting/src/codataccounting/models/shared/billcreditnote.py index d8a97455b..b3bc5b7e0 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billcreditnote.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billcreditnote.py @@ -11,6 +11,7 @@ from ..shared import withholdingtaxitems as shared_withholdingtaxitems from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -21,48 +22,48 @@ class BillCreditNote: r"""> **Bill credit notes or credit notes?** > > In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote). - + View the coverage for bill credit notes in the Data coverage explorer. - + ## Overview - + A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. - + In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier). - + A bill credit note includes details of: * The original and remaining credit. * Any allocations of the credit against other records, such as [bills](https://docs.codat.io/accounting-api#/schemas/Bill). * The supplier that issued the bill credit note. """ - discount_percentage: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage') }}) + discount_percentage: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Percentage rate of any discount applied to the bill credit note.""" status: shared_billcreditnotestatus.BillCreditNoteStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Current state of the bill credit note""" - sub_total: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal') }}) + sub_total: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Total amount of the bill credit note, including discounts but excluding tax.""" - total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }}) + total_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax.""" - total_discount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount') }}) + total_discount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Total value of any discounts applied.""" - total_tax_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount') }}) + total_tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount of tax included in the bill credit note.""" allocated_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allocatedOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -72,34 +73,34 @@ class BillCreditNote: r"""Friendly reference for the bill credit note.""" 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -110,20 +111,20 @@ class BillCreditNote: r"""Identifier for the bill credit note that is unique to a company in the accounting platform.""" issue_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -137,13 +138,13 @@ class BillCreditNote: r"""Any additional information about the bill credit note.""" payment_allocations: Optional[list[shared_items.Items]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentAllocations'), 'exclude': lambda f: f is None }}) r"""An array of payment allocations.""" - remaining_credit: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remainingCredit'), 'exclude': lambda f: f is None }}) + remaining_credit: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remainingCredit'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of the bill credit note that is still outstanding.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ supplier_ref: Optional[shared_supplierref.SupplierRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierRef'), 'exclude': lambda f: f is None }}) r"""Reference to the supplier the record relates to.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billcreditnotelineitem.py b/previous-versions/accounting/src/codataccounting/models/shared/billcreditnotelineitem.py index 65344a2b4..72068c441 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billcreditnotelineitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billcreditnotelineitem.py @@ -2,15 +2,16 @@ from __future__ import annotations import dataclasses +from ..shared import accountingcustomerref as shared_accountingcustomerref from ..shared import accountref as shared_accountref from ..shared import billedtotype as shared_billedtotype -from ..shared import customerref as shared_customerref from ..shared import itemref as shared_itemref from ..shared import projectref as shared_projectref from ..shared import taxrateref as shared_taxrateref from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -22,7 +23,7 @@ class BillCreditNoteLineItemTracking: category_refs: list[shared_trackingcategoryref.TrackingCategoryRef] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('categoryRefs') }}) is_billed_to: shared_billedtotype.BilledToType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) is_rebilled_to: shared_billedtotype.BilledToType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) - customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) + customer_ref: Optional[shared_accountingcustomerref.AccountingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) project_ref: Optional[shared_projectref.ProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }}) @@ -32,28 +33,28 @@ class BillCreditNoteLineItemTracking: @dataclasses.dataclass class BillCreditNoteLineItem: - quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }}) + quantity: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Number of units of the goods or service for which credit has been received.""" - unit_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount') }}) + unit_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Unit price of the goods or service.""" account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Friendly name of each line item. For example, the goods or service for which credit has been received.""" - discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }}) + discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Value of any discounts applied.""" - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Percentage rate of any discount applied to the line item.""" item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }}) - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of credit associated with the line item, including discounts but excluding tax.""" - tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }}) + tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of tax associated with the line item.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -61,14 +62,14 @@ class BillCreditNoteLineItem: - Invoice line items - Items """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the line item, including discounts and tax.""" tracking: Optional[BillCreditNoteLineItemTracking] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tracking'), 'exclude': lambda f: f is None }}) r"""Categories, and a project and customer, against which the item is tracked.""" tracking_category_refs: Optional[list[shared_trackingcategoryref.TrackingCategoryRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategoryRefs'), 'exclude': lambda f: f is None }}) r"""Reference to the tracking categories to which the line item is linked. - - Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billcreditnotes.py b/previous-versions/accounting/src/codataccounting/models/shared/billcreditnotes.py index 3ba2bea0b..03bc44f74 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billcreditnotes.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billcreditnotes.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class BillCreditNotes: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billitem.py b/previous-versions/accounting/src/codataccounting/models/shared/billitem.py index d6433babe..3fb756d61 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billitem.py @@ -6,6 +6,7 @@ from ..shared import taxrateref as shared_taxrateref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -20,9 +21,9 @@ class BillItem: r"""Short description of the product or service that has been bought by the customer.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -30,7 +31,7 @@ class BillItem: - Invoice line items - Items """ - unit_price: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitPrice'), 'exclude': lambda f: f is None }}) + unit_price: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitPrice'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Unit price of the product or service.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billlineitem.py b/previous-versions/accounting/src/codataccounting/models/shared/billlineitem.py index 4b47f904b..dd3c19c2e 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billlineitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billlineitem.py @@ -9,6 +9,7 @@ from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -16,31 +17,31 @@ @dataclasses.dataclass class BillLineItem: - quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }}) + quantity: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Number of units of goods or services received.""" - unit_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount') }}) + unit_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Price of each unit of goods or services.""" account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Friendly name of the goods or services received.""" - discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }}) + discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Numerical value of any discounts applied. - + Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. """ - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) is_direct_cost: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isDirectCost'), 'exclude': lambda f: f is None }}) item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }}) - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of the line, inclusive of discounts but exclusive of tax.""" - tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }}) + tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of tax for the line.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -48,14 +49,11 @@ class BillLineItem: - Invoice line items - Items """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the line, including tax.""" tracking: Optional[shared_propertiestracking.Propertiestracking] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tracking'), 'exclude': lambda f: f is None }}) r"""Categories, and a project and customer, against which the item is tracked.""" tracking_category_refs: Optional[list[shared_trackingcategoryref.TrackingCategoryRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategoryRefs'), 'exclude': lambda f: f is None }}) - r"""Collection of categories against which this item is tracked. - - Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible - """ + r"""Collection of categories against which this item is tracked.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billpayment.py b/previous-versions/accounting/src/codataccounting/models/shared/billpayment.py index 7c7670353..0c2919d09 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billpayment.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billpayment.py @@ -5,12 +5,12 @@ from ..shared import accountref as shared_accountref from ..shared import billpaymentline as shared_billpaymentline from ..shared import metadata as shared_metadata -from ..shared import paymentmethodref as shared_paymentmethodref from ..shared import supplementaldata as shared_supplementaldata from ..shared import supplierref as shared_supplierref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json -from typing import Optional +from decimal import Decimal +from typing import Any, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @@ -22,40 +22,40 @@ class BillPayment: > We distinguish between transactions where the company received money vs. paid money. If the transaction represents a company spending money (accounts payable) we call this a Bill payment. > > See [payments](https://docs.codat.io/accounting-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote). - + > View the coverage for bill payments in the Data coverage explorer. - + ## Overview - + Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/accounting-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/accounting-api#/schemas/BillCreditNote)). - + A bill payment in Codat usually represents an allocation of money within any customer accounts payable account. This includes, but is not strictly limited to: - + - A payment made against a bill — for example, a credit card payment, cheque payment, or cash payment. - An allocation of a supplier's credit note to a bill or perhaps a refund. - A bill payment made directly to an accounts payable account. This could be an overpayment or a prepayment, or a refund of a payment made directly to an accounts payable account. - + Depending on the bill payments which are allowed by the underlying accounting package, some of these types may be combined. Please see the example data section for samples of what these cases look like. - + In Codat, a bill payment contains details of: - + - When the bill payment was recorded in the accounting system. - How much it is for and in the currency. - Who the payment has been paid to, the _supplier_. - The types of bill payments, the _line items_. - + Some accounting platforms give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's _expenses_. You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. - + Bill payments is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). - + --- - + ## Bill payment types - + ### Payment of a bill - + A payment paying a single bill should have the following properties: - + - A `totalAmount` indicating the amount of the bill that was paid. This is always positive. - A `lines` array containing one element with the following properties: - An `amount` equal to the `totalAmount` above. @@ -63,38 +63,38 @@ class BillPayment: - A `type` indicating the type of link, in this case a `Bill`. - An `id` containing the ID of the bill that was paid. - An amount of `-totalAmount` (negative `totalAmount`), indicating that the entirety of the paid amount is allocated to the bill. - + ### Payment of multiple bills - + It is possible for one payment to pay multiple bills. This can be represented using two possible formats, depending on how the supplier keeps their books: - + 1. The payment has multiple entries in its **lines** array, one for each bill that is paid. Each line will follow the above example for paying a bill, and the rules detailed in the data model. 2. The payment has a line with multiple links to each bill. This occurs when the proportion of the original payment allocated to each bill is not available. - + Each line is the same as those described above, with the **amount** indicating how much of the payment is allocated to the bill. The **amount** on the lines sum to the **totalAmount** on the payment. - + > Pushing batch payments to Xero > > When pushing a single bill payment to Xero to pay multiple bills, only the first format is supported—multiple entries in the payment **lines** array. - + ### Payments and refunds on account - + A payment on account, that is a payment that doesn’t pay a specific bill, has one entry in its lines array. - + The line has the following properties: - + - A **totalAmount** indicating the amount paid by a supplier or refunded to them by a company. A payment to the supplier is always negative. A refund is always positive. - A **links** array containing one element with the following properties: - A **type** indicating the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`. - The **id** containing the ID of the supplier. - An amount for the link is `0` **totalAmount** or the amount of the payment or refund. - + It is possible to have a payment that is part on account and part allocated to a bill. Each line should follow the examples above. - + ### Using a credit note to pay a bill - + The payment of a bill using a credit note has one entry in its `lines` array. This **line** has the following properties: - + - An **amount** indicating the amount of money moved, which in this case is `0`, as the credit note and bill allocation must balance each other. - A **links** array containing two elements: - The first link has: @@ -103,68 +103,68 @@ class BillPayment: - The second link has: - A **type** indicating the type of link, in this case a `CreditNote`. - An **id** containing the ID of the credit note used by this payment. - + The **amount** field on the **line** equals the **totalAmount** on the payment. - + ### Refunding a credit note - + A bill payment refunding a credit note has one entry in its **lines** array. This line has the following properties: - + - An **amount** indicating the amount of the credit note that was refunded. This is always negative, indicating that it is a refund. - A **links** array containing one element with the following properties: - A **type** indicating the type of `link`, in this case a `CreditNote`. - An **id** containing the ID of the credit note that was refunded. - + The **totalAmount** field on the payment equals the line's **amount** field. These are both negative, as this is money leaving accounts payable. - + ### Refunding a payment - + If a payment is refunded, for example, when a company overpaid a bill and the overpayment is returned, there are two payment records: - + - One for the incoming overpayment. - Another for the outgoing refund. - + The payment issuing the refund is identified by the fact that the **totalAmount** is negative. This payment has one entry in its lines array that have the following properties: - + - An **amount** indicating the amount that was refunded. This is always negative. - A **links** array containing one element with the following properties: - A **type** indicating the type of a the link, in this case a `BillPayment`. - An **id** containing the ID of the payment that was refunded. - + The **amount** field on the line equals the **totalAmount** on the payment and is negative as this is money leaving accounts payable. - + The payment that was refunded can be identified as it has a line where the `amount` on its `line` is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was partly used to pay an bill. For example, a £1,050 payment paying a £1,000 bill with a refund of £50 has two lines: - + - One for £1,000 linked to the bill that was paid - Another for £50 linked to the payment that refunded the over payment. This link is of type `Refund` but the ID corresponds to a bill payment. - + The line linked to the bill payment has the following properties: - + - An **amount** indicating the amount that was refunded. This is positive as its money that was added to accounts payable, but is balanced out by the negative amount of the refund. - A **links** array containing one element with the following properties: - A **type** indicating the type of the link, in this case a `Refund`. - An **id** containing the ID of the payment that refunded this line. - + > Linked payments > > Not all accounting packages support linked payments in this way. In these platforms you may see a payment on account and a refund on account. - + ## Foreign currencies - + There are two types of currency rate that are detailed in the bill payments data type: - + Payment currency rate: - + - Base currency of the accounts payable account. - Foreign currency of the bill payment. - + Payment line link currency rate: - + - Base currency of the item that the link represents. - Foreign currency of the payment. - + These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a bill payment is applied to an item in a currency that does not match either: - + - The base currency for the accounts payable account. - The currency of the item. """ @@ -172,27 +172,27 @@ class BillPayment: account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -207,17 +207,17 @@ class BillPayment: modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }}) note: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('note'), 'exclude': lambda f: f is None }}) r"""Additional information associated with the payment.""" - payment_method_ref: Optional[shared_paymentmethodref.PaymentMethodRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentMethodRef'), 'exclude': lambda f: f is None }}) + payment_method_ref: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentMethodRef'), 'exclude': lambda f: f is None }}) reference: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference'), 'exclude': lambda f: f is None }}) r"""Additional information associated with the payment.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ supplier_ref: Optional[shared_supplierref.SupplierRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierRef'), 'exclude': lambda f: f is None }}) - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billpaymentline.py b/previous-versions/accounting/src/codataccounting/models/shared/billpaymentline.py index 5365971f5..64b70fced 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billpaymentline.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billpaymentline.py @@ -5,6 +5,7 @@ from ..shared import billpaymentlinelink as shared_billpaymentlinelink from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -12,24 +13,24 @@ @dataclasses.dataclass class BillPaymentLine: - amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }}) + amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount in the bill payment currency.""" allocated_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allocatedOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billpaymentlinelink.py b/previous-versions/accounting/src/codataccounting/models/shared/billpaymentlinelink.py index 552f74fc7..9cc233be5 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billpaymentlinelink.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billpaymentlinelink.py @@ -5,6 +5,7 @@ from ..shared import billpaymentlinelinktype as shared_billpaymentlinelinktype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -14,33 +15,33 @@ class BillPaymentLineLink: type: shared_billpaymentlinelinktype.BillPaymentLineLinkType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""Types of links to bill payment lines.""" - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) + amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount by which the balance of the linked entity is altered, in the currency of the linked entity. - + - A negative link amount reduces the outstanding amount on the accounts payable account. - A positive link amount increases the outstanding amount on the accounts payable account. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | diff --git a/previous-versions/accounting/src/codataccounting/models/shared/billpayments.py b/previous-versions/accounting/src/codataccounting/models/shared/billpayments.py index b0abaf124..6693f4f98 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/billpayments.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/billpayments.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class BillPayments: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/bills.py b/previous-versions/accounting/src/codataccounting/models/shared/bills.py index 8111e2eed..8be816434 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/bills.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/bills.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Bills: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/cashflowstatement.py b/previous-versions/accounting/src/codataccounting/models/shared/cashflowstatement.py index 186c86e4e..0cb7f35c8 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/cashflowstatement.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/cashflowstatement.py @@ -16,20 +16,20 @@ class CashFlowStatement: cash_receipts: Optional[shared_reportline.ReportLine] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('cashReceipts'), 'exclude': lambda f: f is None }}) from_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fromDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -37,20 +37,20 @@ class CashFlowStatement: """ to_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('toDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/cashflowstatement1.py b/previous-versions/accounting/src/codataccounting/models/shared/cashflowstatement1.py index 05bca6f26..28036cde7 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/cashflowstatement1.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/cashflowstatement1.py @@ -15,26 +15,26 @@ @dataclasses.dataclass class CashFlowStatement1: r"""> View the coverage for cash flow statement in the Data coverage explorer. - + > **Operating activities only** > > Currently, the cash flow statement shows cash that flows into and out of the company from operating activities *only*. Operating activities generate cash from the sale of goods or services. - + ## Overview - + A cash flow statement is a financial report that records all cash that is received or spent by a company during a given period. It gives you a clearer picture of the company’s performance, and their ability to pay creditors and finance growth. - + > **Cash flow statement or balance sheet?** > > Look at the cash flow statement to understand a company's ability to pay its bills. Although the balance sheet may show healthy earnings at a specific point in time, the cash flow statement allows you to see whether the company is meeting its financial commitments, such as paying creditors or its employees. """ currency: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency') }}) 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. """ report_basis: shared_reportbasis.ReportBasis = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reportBasis') }}) @@ -45,20 +45,20 @@ class CashFlowStatement1: r"""Array of cash flow statements.""" earliest_available_month: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('earliestAvailableMonth'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -66,20 +66,20 @@ class CashFlowStatement1: """ most_recent_available_month: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mostRecentAvailableMonth'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/companydataset.py b/previous-versions/accounting/src/codataccounting/models/shared/companydataset.py index 5dd228aa7..a133d6c4e 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/companydataset.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/companydataset.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import addresstype as shared_addresstype +from ..shared import accountingaddresstype as shared_accountingaddresstype from ..shared import phonenumbertype as shared_phonenumbertype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json @@ -13,8 +13,8 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class CompanyDatasetAddresses: - type: shared_addresstype.AddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) +class CompanyDatasetAccountingAddress: + type: shared_accountingaddresstype.AccountingAddressType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) r"""The type of the address""" city: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('city'), 'exclude': lambda f: f is None }}) r"""City of the customer address.""" @@ -68,16 +68,16 @@ class CompanyDatasetWeblink: @dataclasses.dataclass class CompanyDataset: r"""> View the coverage for company info in the Data coverage explorer. - + Company info provides standard details about a linked company such as their address, phone number, and company registration. - + > **Company information or companies?** > > Company information is standard information that is held in the accounting platform about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources. """ accounting_platform_ref: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountingPlatformRef'), 'exclude': lambda f: f is None }}) r"""Identifier or reference for the company in the accounting platform.""" - addresses: Optional[list[CompanyDatasetAddresses]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses'), 'exclude': lambda f: f is None }}) + addresses: Optional[list[CompanyDatasetAccountingAddress]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('addresses'), 'exclude': lambda f: f is None }}) r"""An array of Addresses.""" base_currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('baseCurrency'), 'exclude': lambda f: f is None }}) r"""Currency set in the accounting platform of the linked company. Used by the currency rate.""" @@ -87,20 +87,20 @@ class CompanyDataset: r"""Name of the linked company.""" created_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -108,20 +108,20 @@ class CompanyDataset: """ financial_year_start_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('financialYearStartDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -129,20 +129,20 @@ class CompanyDataset: """ ledger_lock_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ledgerLockDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -154,7 +154,7 @@ class CompanyDataset: r"""Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House.""" source_urls: Optional[dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceUrls'), 'exclude': lambda f: f is None }}) r"""URL addresses for the accounting source. - + For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). """ tax_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxNumber'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/contact.py b/previous-versions/accounting/src/codataccounting/models/shared/contact.py index fcd81371b..647874869 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/contact.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/contact.py @@ -21,20 +21,20 @@ class Contact: 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 }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createaccountresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createaccountresponse.py index 58e86fbd2..4f79d80cd 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createaccountresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createaccountresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateAccountResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateAccountResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateAccountResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,20 +71,28 @@ class CreateAccountResponse: """ data: Optional[shared_account.Account] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. - + View the coverage for accounts in the Data coverage explorer. - + ## Overview - + Accounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company. - + The categories for an account include: * Asset * Expense * Income * Liability * Equity. - + + The same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online. + + At the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided. + + To determine the list of allowed categories for a specific integration, you can: + - Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/accounting-api#/operations/get-create-chartOfAccounts-model). + - Refer to the integration's own documentation. + > **Accounts with no category** > > If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`. @@ -94,9 +102,10 @@ class CreateAccountResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createbankaccountresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createbankaccountresponse.py index e3171565a..f9390afb6 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createbankaccountresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createbankaccountresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateBankAccountResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateBankAccountResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateBankAccountResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -75,13 +75,13 @@ class CreateBankAccountResponse: > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. > > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/schemas/Account) - + > View the coverage for bank accounts in the Data coverage explorer. - + ## Overview - + A list of bank accounts associated with a company and a specific data connection. - + Bank accounts data includes: * The name and ID of the account in the accounting platform. * The currency and balance of the account. @@ -90,9 +90,10 @@ class CreateBankAccountResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createbankaccounttransaction.py b/previous-versions/accounting/src/codataccounting/models/shared/createbankaccounttransaction.py index eb068904d..b94c06852 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createbankaccounttransaction.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createbankaccounttransaction.py @@ -4,6 +4,7 @@ import dataclasses from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -11,24 +12,24 @@ @dataclasses.dataclass class CreateBankAccountTransaction: - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) - balance: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'exclude': lambda f: f is None }}) + amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) + balance: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) date_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('date'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createbanktransactionsresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createbanktransactionsresponse.py index 9a91a8f1e..38355c4f0 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createbanktransactionsresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createbanktransactionsresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateBankTransactionsResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateBankTransactionsResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateBankTransactionsResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -73,9 +73,10 @@ class CreateBankTransactionsResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""Your API request was not properly authorized.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createbillcreditnoteresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createbillcreditnoteresponse.py index 4c53fa325..bce1af383 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createbillcreditnoteresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createbillcreditnoteresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateBillCreditNoteResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateBillCreditNoteResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateBillCreditNoteResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -73,15 +73,15 @@ class CreateBillCreditNoteResponse: r"""> **Bill credit notes or credit notes?** > > In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote). - + View the coverage for bill credit notes in the Data coverage explorer. - + ## Overview - + A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. - + In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier). - + A bill credit note includes details of: * The original and remaining credit. * Any allocations of the credit against other records, such as [bills](https://docs.codat.io/accounting-api#/schemas/Bill). @@ -90,9 +90,10 @@ class CreateBillCreditNoteResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createbillpaymentresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createbillpaymentresponse.py index 8c5d104da..2cc758ad9 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createbillpaymentresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createbillpaymentresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateBillPaymentResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateBillPaymentResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateBillPaymentResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -75,40 +75,40 @@ class CreateBillPaymentResponse: > We distinguish between transactions where the company received money vs. paid money. If the transaction represents a company spending money (accounts payable) we call this a Bill payment. > > See [payments](https://docs.codat.io/accounting-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote). - + > View the coverage for bill payments in the Data coverage explorer. - + ## Overview - + Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/accounting-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/accounting-api#/schemas/BillCreditNote)). - + A bill payment in Codat usually represents an allocation of money within any customer accounts payable account. This includes, but is not strictly limited to: - + - A payment made against a bill — for example, a credit card payment, cheque payment, or cash payment. - An allocation of a supplier's credit note to a bill or perhaps a refund. - A bill payment made directly to an accounts payable account. This could be an overpayment or a prepayment, or a refund of a payment made directly to an accounts payable account. - + Depending on the bill payments which are allowed by the underlying accounting package, some of these types may be combined. Please see the example data section for samples of what these cases look like. - + In Codat, a bill payment contains details of: - + - When the bill payment was recorded in the accounting system. - How much it is for and in the currency. - Who the payment has been paid to, the _supplier_. - The types of bill payments, the _line items_. - + Some accounting platforms give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's _expenses_. You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. - + Bill payments is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). - + --- - + ## Bill payment types - + ### Payment of a bill - + A payment paying a single bill should have the following properties: - + - A `totalAmount` indicating the amount of the bill that was paid. This is always positive. - A `lines` array containing one element with the following properties: - An `amount` equal to the `totalAmount` above. @@ -116,38 +116,38 @@ class CreateBillPaymentResponse: - A `type` indicating the type of link, in this case a `Bill`. - An `id` containing the ID of the bill that was paid. - An amount of `-totalAmount` (negative `totalAmount`), indicating that the entirety of the paid amount is allocated to the bill. - + ### Payment of multiple bills - + It is possible for one payment to pay multiple bills. This can be represented using two possible formats, depending on how the supplier keeps their books: - + 1. The payment has multiple entries in its **lines** array, one for each bill that is paid. Each line will follow the above example for paying a bill, and the rules detailed in the data model. 2. The payment has a line with multiple links to each bill. This occurs when the proportion of the original payment allocated to each bill is not available. - + Each line is the same as those described above, with the **amount** indicating how much of the payment is allocated to the bill. The **amount** on the lines sum to the **totalAmount** on the payment. - + > Pushing batch payments to Xero > > When pushing a single bill payment to Xero to pay multiple bills, only the first format is supported—multiple entries in the payment **lines** array. - + ### Payments and refunds on account - + A payment on account, that is a payment that doesn’t pay a specific bill, has one entry in its lines array. - + The line has the following properties: - + - A **totalAmount** indicating the amount paid by a supplier or refunded to them by a company. A payment to the supplier is always negative. A refund is always positive. - A **links** array containing one element with the following properties: - A **type** indicating the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`. - The **id** containing the ID of the supplier. - An amount for the link is `0` **totalAmount** or the amount of the payment or refund. - + It is possible to have a payment that is part on account and part allocated to a bill. Each line should follow the examples above. - + ### Using a credit note to pay a bill - + The payment of a bill using a credit note has one entry in its `lines` array. This **line** has the following properties: - + - An **amount** indicating the amount of money moved, which in this case is `0`, as the credit note and bill allocation must balance each other. - A **links** array containing two elements: - The first link has: @@ -156,77 +156,78 @@ class CreateBillPaymentResponse: - The second link has: - A **type** indicating the type of link, in this case a `CreditNote`. - An **id** containing the ID of the credit note used by this payment. - + The **amount** field on the **line** equals the **totalAmount** on the payment. - + ### Refunding a credit note - + A bill payment refunding a credit note has one entry in its **lines** array. This line has the following properties: - + - An **amount** indicating the amount of the credit note that was refunded. This is always negative, indicating that it is a refund. - A **links** array containing one element with the following properties: - A **type** indicating the type of `link`, in this case a `CreditNote`. - An **id** containing the ID of the credit note that was refunded. - + The **totalAmount** field on the payment equals the line's **amount** field. These are both negative, as this is money leaving accounts payable. - + ### Refunding a payment - + If a payment is refunded, for example, when a company overpaid a bill and the overpayment is returned, there are two payment records: - + - One for the incoming overpayment. - Another for the outgoing refund. - + The payment issuing the refund is identified by the fact that the **totalAmount** is negative. This payment has one entry in its lines array that have the following properties: - + - An **amount** indicating the amount that was refunded. This is always negative. - A **links** array containing one element with the following properties: - A **type** indicating the type of a the link, in this case a `BillPayment`. - An **id** containing the ID of the payment that was refunded. - + The **amount** field on the line equals the **totalAmount** on the payment and is negative as this is money leaving accounts payable. - + The payment that was refunded can be identified as it has a line where the `amount` on its `line` is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was partly used to pay an bill. For example, a £1,050 payment paying a £1,000 bill with a refund of £50 has two lines: - + - One for £1,000 linked to the bill that was paid - Another for £50 linked to the payment that refunded the over payment. This link is of type `Refund` but the ID corresponds to a bill payment. - + The line linked to the bill payment has the following properties: - + - An **amount** indicating the amount that was refunded. This is positive as its money that was added to accounts payable, but is balanced out by the negative amount of the refund. - A **links** array containing one element with the following properties: - A **type** indicating the type of the link, in this case a `Refund`. - An **id** containing the ID of the payment that refunded this line. - + > Linked payments > > Not all accounting packages support linked payments in this way. In these platforms you may see a payment on account and a refund on account. - + ## Foreign currencies - + There are two types of currency rate that are detailed in the bill payments data type: - + Payment currency rate: - + - Base currency of the accounts payable account. - Foreign currency of the bill payment. - + Payment line link currency rate: - + - Base currency of the item that the link represents. - Foreign currency of the payment. - + These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a bill payment is applied to an item in a currency that does not match either: - + - The base currency for the accounts payable account. - The currency of the item. """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createbillresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createbillresponse.py index 29f495b68..9f2cef94b 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createbillresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createbillresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateBillResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateBillResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateBillResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -75,27 +75,28 @@ class CreateBillResponse: > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. > > See [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) for the accounts receivable equivalent of bills. - + View the coverage for bills in the Data coverage explorer. - + ## Overview - + In Codat, a bill contains details of: * When the bill was recorded in the accounting system. * How much the bill is for and the currency of the amount. * Who the bill was received from — the *supplier*. * What the bill is for — the *line items*. - + Some accounting platforms give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. - + You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createcreditnoteresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createcreditnoteresponse.py index a7076ec0a..dc4e16e08 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createcreditnoteresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createcreditnoteresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateCreditNoteResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateCreditNoteResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateCreditNoteResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,13 +71,13 @@ class CreateCreditNoteResponse: """ data: Optional[shared_creditnote.CreditNote] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> View the coverage for credit notes in the Data coverage explorer. - + ## Overview - + Think of a credit note as a voucher issued to a customer. It is a reduction that can be applied against one or multiple invoices. A credit note can either reduce the amount owed or cancel out an invoice entirely. - + In the Codat system a credit note is issued to a [customer's](https://docs.codat.io/accounting-api#/schemas/Customer) accounts receivable. - + It contains details of: * The amount of credit remaining and its status. * Payment allocations against the payments type, in this case an invoice. @@ -86,9 +86,10 @@ class CreateCreditNoteResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createcustomerresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createcustomerresponse.py index 3df62f507..fac7fe8d5 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createcustomerresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createcustomerresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateCustomerResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateCustomerResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateCustomerResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,19 +71,20 @@ class CreateCustomerResponse: """ data: Optional[shared_customer.Customer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> 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/accounting-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 }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createdirectcostresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createdirectcostresponse.py index 926392b85..00c8f5584 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createdirectcostresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createdirectcostresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateDirectCostResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateDirectCostResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateDirectCostResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,25 +71,28 @@ class CreateDirectCostResponse: """ data: Optional[shared_directcost.DirectCost] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting platforms. - + > View the coverage for direct costs in the Data coverage explorer. - + ## Overview - + + Direct costs are the expenses associated with a business' operations. For example, purchases of raw materials and service fees are considered direct costs. + Direct costs include: * Purchasing an item and paying it off at the point of the purchase * Receiving cash from a refunded item if the refund is made by the supplier * Withdrawing money from a bank account * Writing a cheque - + Direct costs is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createdirectincomeresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createdirectincomeresponse.py index fc16088e2..2efd1922e 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createdirectincomeresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createdirectincomeresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateDirectIncomeResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateDirectIncomeResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateDirectIncomeResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,25 +71,28 @@ class CreateDirectIncomeResponse: """ data: Optional[shared_directincome.DirectIncome] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> **Language tip:** Direct incomes may also be referred to as **Receive transactions**, **Receive money transactions**, **Sales receipts**, or **Cash sales** in various accounting platforms. - + > View the coverage for direct incomes in the Data coverage explorer. - + ## Overview - + + Direct incomes are incomes received directly from the business' operations. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes. + Direct incomes include: - + - Selling an item directly to a contact, and receiving payment at the point of the sale. - Refunding an item in cash to a contact. - Depositing money into a bank account. - + Direct incomes is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createinvoiceresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createinvoiceresponse.py index 7722f85a4..c778b6778 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createinvoiceresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createinvoiceresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateInvoiceResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateInvoiceResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateInvoiceResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -75,27 +75,27 @@ class CreateInvoiceResponse: > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company issued an invoice, and is owed money (accounts receivable) we call this an Invoice. > > See [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) for the accounts payable equivalent of bills. - + View the coverage for invoices in the Data coverage explorer. - + ## Overview - + An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/accounting-api#/schemas/Customer). - + In Codat, an invoice contains details of: - + - The timeline of the invoice—when it was raised, marked as paid, last edited, and so on. - How much the invoice is for, what portion of the invoice is tax or discounts, and what currency the amounts are represented in. - Who the invoice has been raised to; the _customer_. - The breakdown of what the invoice is for; the _line items_. - Any [payments](https://docs.codat.io/accounting-api#/schemas/Payment) assigned to the invoice; the _payment allocations_. - + > **Invoice PDF downloads** > > You can download a PDF version of an invoice for supported integrations. > > The filename will be invoice-{number}.pdf. - + > **Referencing an invoice in Sage 50 and ClearBooks** > > In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same. @@ -103,9 +103,10 @@ class CreateInvoiceResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createitemresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createitemresponse.py index b6d4293f5..6ac0d4bf9 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createitemresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createitemresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateItemResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateItemResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateItemResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,17 +71,18 @@ class CreateItemResponse: """ data: Optional[shared_item.Item] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> View the coverage for items in the Data coverage explorer. - + ## Overview - + **Items** allow your customers to save and track details of the products and services that they buy and sell. """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createjournalentryresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createjournalentryresponse.py index e6a747f5a..e92d0ce78 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createjournalentryresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createjournalentryresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateJournalEntryResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateJournalEntryResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateJournalEntryResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,34 +71,35 @@ class CreateJournalEntryResponse: """ data: Optional[shared_journalentry.JournalEntry] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) data type - + > View the coverage for journal entries in the Data coverage explorer. - + ## Overview - + A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/accounting-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance. - + A journal entry line item is a single transaction line on the journal entry. For example: - + - When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items. - When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue. - + In Codat a journal entry contains details of: - + - The date on which the entry was created and posted. - Itemised lines, including amounts and currency. - A reference to the associated accounts. - A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger. - + > **Pushing journal entries** > Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency. """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createjournalresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createjournalresponse.py index 367112a42..7796d0581 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createjournalresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createjournalresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateJournalResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateJournalResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateJournalResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,34 +71,35 @@ class CreateJournalResponse: """ data: Optional[shared_journal.Journal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) data type - + > View the coverage for journals in the Data coverage explorer. - + ## Overview - + In accounting software, journals are used to record all the financial transactions of a company. Each transaction in a journal is represented by a separate [journal entry](https://docs.codat.io/accounting-api#/schemas/JournalEntry). These entries are used to create the general ledger, which is then used to create the financial statements of a business. - + When a company records all their transactions in a single journal, it can become large and difficult to maintain and track. This is why large companies often use multiple journals (also known as subjournals) to categorize and manage journal entries. - + Such journals can be divided into two categories: - + - Special journals: journals used to record specific types of transactions; for example, a purchases journal, a sales journal, or a cash management journal. - General journals: journals used to record transactions that fall outside the scope of the special journals. - + Multiple journals or subjournals are used in the following Codat integrations: - + - [Sage Intacct](https://docs.codat.io/integrations/accounting/sage-intacct/accounting-sage-intacct) (mandatory) - [Exact Online](https://docs.codat.io/integrations/accounting/exact-online/accounting-exact-online) (mandatory) - [Oracle NetSuite](https://docs.codat.io/integrations/accounting/netsuite/accounting-netsuite) (optional) - + > When pushing journal entries to an accounting platform that doesn’t support multiple journals (multi-book accounting), the entries will be linked to the platform-generic journal. The Journals data type will only include one object. """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createpaymentresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createpaymentresponse.py index ca9719fbb..c2135616a 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createpaymentresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createpaymentresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreatePaymentResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreatePaymentResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreatePaymentResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -73,70 +73,70 @@ class CreatePaymentResponse: r"""> **Payments or bill payments?** > > In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/accounting-api#/schemas/Bill) and credit notes against bills. - + > View the coverage for payments in the Data coverage explorer. - + ## Overview - + Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote). - + A payment in Codat usually represents an allocation of money within any customer accounts receivable account. This includes, but is not strictly limited to: - + - A payment made against an invoice, like a credit card, cheque, or cash payment. - An allocation of a customer's credit note, either to an invoice or maybe a refund. - A payment made directly to that accounts receivable account. This might be an overpayment or a prepayment. It might also be the refund of a payment made directly to an accounts receivable account. - + Depending on the payments allowed by the underlying accounting package, some payment types may be combined. Please see the example for more details. - + In Codat, a payment contains details of: - + - When the payment was recorded in the accounting system. - How much it is for and in what currency that amount is in. - Who the payment was _paid by_ – the _customer_. - The payment method used. - The breakdown of the types of payments – the _line items_. - + Payments is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). - + ## Payment types - + ## Payment of an invoice - + A payment paying a single invoice has one entry in its `lines` array. This **line** has the following properties: - + - An _amount_ that indicates the amount of the invoice that was paid. This is always positive. - A **links** array containing one element with the following properties: - A **type** that indicates the type of **link**, in this case an `Invoice`. - An **id** that contains the ID of the invoice that was paid. - An **amount** for the link. The sum of the **line.amount** and the **links.amount** must equal `0`. - + The **amount** field on the **line** equals the **totalAmount** on the payment. - + ## Payment of multiple invoices - + A single payment can pay multiple invoices. This can be represented in one of two formats depending on how the customer keeps their books: - + - The payment has multiple entries in its **lines** array, one for each invoice that is paid. Each line follows the example and rules described in [Payment of an invoice](#payment-of-an-invoice). - The payment has a line with multiple links to each invoice. This occurs when the proportion of the original payment allocated to each invoice is not available. - + Each **line** has the same properties as those described in [Payment of an invoice](#payment-of-an-invoice), with the **amount** indicating how much of the payment was allocated to the invoice. The sum of line amounts equals the **totalAmount** on the payment. - + ## Payments and refunds on account - + A payment on account, that is a payment that doesn’t pay a specific invoice, has one entry in its lines array. The **line** has the following properties: - + - A **totalAmount** that indicates the amount paid by a customer or refunded to them by a company. A payment to the customer is always negative. A refund is always positive. - A **links** array containing one element with the following properties: - A **type** that indicates the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`. - The **id** containing the ID of the customer. - The **amount** for the link is `0` – the **totalAmount** _or_ the amount of the payment or refund. - + It is possible to have a payment that is part _on account_ and part _allocated_ to an invoice. Each line should follow the examples above. - + ## Using a credit note to pay an invoice - + The payment of an invoice using a credit note has one entry in its **lines** array. This **line** has the following properties: - + - An **amount** that indicates the amount of money moved, which in this case is `0`, as the credit note and invoice allocation must balance each other. - A **links** array containing two elements: - The first **link** has: @@ -145,73 +145,73 @@ class CreatePaymentResponse: - The second **link** has: - A **type** that indicates the type of **link**, in this case a `CreditNote`. - An **id** that contains the ID of the credit note used by this payment. - + The **amount** field on the **line** equals the **totalAmount** on the payment. - + ## Refunding a credit note - + A payment refunding a credit note has one entry in its **lines** array. This **line** has the following properties: - + - An **amount** that indicates the amount of the credit note that was refunded. This is always negative for a refund. - A **links** array that contains one element with the following properties: - A **type** that indicates the type of **link**, in this case a `CreditNote`. - An **id** that contains the ID of the credit note that was refunded. - + The **totalAmount** field on the payment equals the **amount** field of the **line**. These are both negative, as this is money leaving accounts receivable. - + ## Refunding a payment - + If a payment is refunded, for example, if a customer overpaid an invoice and the overpayment is returned to the customer, there are two payment records: - + - One for the incoming over payment. - Another for the outgoing refund. - + The payment issuing the refund has a negative **totalAmount**. This payment also has one entry in its lines array with the following properties: - + - An **amount** that indicates the amount that was refunded. This is always negative. - A **links** array that contains one element with the following properties: - A **type** that indicates the type of **link**, in this case a `Payment`. - An **id** that contains the ID of the payment that was refunded. - + The **amount** field on the **line** equals the **totalAmount** on the payment and is negative, as this is money leaving accounts receivable. - + The payment that was refunded has a line where the **amount** is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was used to partly pay an invoice. - + For example: A £1,050 payment on a £1,000 invoice with a refund of £50 has two lines: - + - One for £1,000 linked to the invoice that was paid. - Another for £50 linked to the payment that refunded the overpayment with a** type** of `Refund` and an ID that corresponds to the payment. - + The **line** linked to the payment has the following properties: - + - An **amount** that indicates the amount that was refunded. This is positive as its money that was added to accounts receivable. It's balanced out by the negative amount of the refund. - A **links** array containing one element with the following properties: - A **type** that indicates the type of **link**, in this case a `Refund`. - An **id** that contains the ID of the payment that refunded this line. - + > **Support for linked payments** > > Not all accounting packages support linking payments in this way. In some platforms, you may see a payment on account and a refund on account. - + ## Foreign currencies - + There are two types of currency rate that are included in the payments data type: - + Payment currency rate: - + - Base currency of the accounts receivable account. - Foreign currency of the payment. - + Payment line link currency rate: - + - Base currency of the item the link represents. - Foreign currency of the payment. - + These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a payment is applied to an item in a currency that doesn't match either: - + - The base currency for the accounts receivable account. - The currency of the item. - + ```json title=\"Currency rate example\" { \"id\": \"123\", @@ -233,17 +233,17 @@ class CreatePaymentResponse: ] } ``` - - - + + + ## Example data - + > **Object properties** > > For the sake of brevity, the examples here may omit properties from objects. For the full object definition, see [Payments](https://api.codat.io/swagger/index.html#/Payments). - + ## Simple examples - + ```json title=\"Payment for invoice\" { \"totalAmount\": 1000, @@ -261,9 +261,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Allocation of credit note\" { \"totalAmount\": 0, @@ -286,9 +286,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Payment of invoice and payment on account\" { \"totalAmount\": 2000, @@ -316,9 +316,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Refund of credit note\" { \"totalAmount\": -1000, @@ -336,9 +336,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Refund on accounts receivable account\" { \"totalAmount\": -1000, @@ -356,9 +356,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Linked refund on accounts receivable account\" { \"id\" : \"payment-001\", @@ -393,9 +393,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Using a credit note and cash to pay an invoice\" { \"totalAmount\": 250, @@ -428,11 +428,11 @@ class CreatePaymentResponse: ] } ``` - - - + + + ## Complex examples - + ```json title=\"Use two credit notes and 1000 in to \"bank\" (cash, cheque etc.) to pay invoice\" { \"totalAmount\": 1000, @@ -480,9 +480,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Pay an invoice with two credit notes and cash, with 1000 left 'on account'\" { \"totalAmount\": 2000, @@ -540,9 +540,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Two credit notes pay two invoices with no allocation amount specified\" { \"totalAmount\": 0, @@ -575,9 +575,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Two credit notes and cash pay three invoices with no allocation amount specified, and refund cash\" { \"totalAmount\": 2000, @@ -641,11 +641,11 @@ class CreatePaymentResponse: ] } ``` - - - + + + In this example, a payment on account is used to pay the same invoice in January and again in February. - + ```json title=\"January\" { \"id\": \"001\", @@ -675,9 +675,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"February\" { \"id\": \"001\", @@ -717,9 +717,9 @@ class CreatePaymentResponse: ] } ``` - - - + + + ```json title=\"Two credit notes and some cash pay two invoices with no allocations specified\" { \"totalAmount\": 500, @@ -752,9 +752,10 @@ class CreatePaymentResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createpurchaseorderresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createpurchaseorderresponse.py index 128e7163b..b902d69e8 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createpurchaseorderresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createpurchaseorderresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreatePurchaseOrderResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreatePurchaseOrderResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreatePurchaseOrderResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,19 +71,20 @@ class CreatePurchaseOrderResponse: """ data: Optional[shared_purchaseorder.PurchaseOrder] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> View the coverage for purchase orders in the Data coverage explorer. - + ## Overview - + Purchase orders represent a business's intent to purchase goods or services from a supplier and normally include information such as expected delivery dates and shipping details. - + This information can be used to provide visibility on a business's expected payables and to track a purchase through the full procurement process. """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createsupplierresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createsupplierresponse.py index 1f88cd08a..81dbde9a4 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createsupplierresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createsupplierresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateSupplierResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateSupplierResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateSupplierResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,17 +71,18 @@ class CreateSupplierResponse: """ data: Optional[shared_supplier.Supplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) 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/accounting-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/accounting-api#/schemas/Bill). """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/createtransferresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/createtransferresponse.py index fc6b99ed8..2a8e52882 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/createtransferresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/createtransferresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class CreateTransferResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class CreateTransferResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class CreateTransferResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,15 +71,16 @@ class CreateTransferResponse: """ data: Optional[shared_transfer.Transfer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> View the coverage for transfers in the Data coverage explorer. - + A transfer records the movement of money between two bank accounts, or between a bank account and a nominal account. It is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/creditnote.py b/previous-versions/accounting/src/codataccounting/models/shared/creditnote.py index 522055e90..f4fde8439 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/creditnote.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/creditnote.py @@ -2,15 +2,16 @@ from __future__ import annotations import dataclasses +from ..shared import accountingcustomerref as shared_accountingcustomerref from ..shared import creditnotelineitem as shared_creditnotelineitem from ..shared import creditnotestatus as shared_creditnotestatus -from ..shared import customerref as shared_customerref from ..shared import items as shared_items from ..shared import metadata as shared_metadata from ..shared import supplementaldata as shared_supplementaldata from ..shared import withholdingtaxitems as shared_withholdingtaxitems from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -19,49 +20,49 @@ @dataclasses.dataclass class CreditNote: r"""> View the coverage for credit notes in the Data coverage explorer. - + ## Overview - + Think of a credit note as a voucher issued to a customer. It is a reduction that can be applied against one or multiple invoices. A credit note can either reduce the amount owed or cancel out an invoice entirely. - + In the Codat system a credit note is issued to a [customer's](https://docs.codat.io/accounting-api#/schemas/Customer) accounts receivable. - + It contains details of: * The amount of credit remaining and its status. * Payment allocations against the payments type, in this case an invoice. * Which customers the credit notes have been issued to. """ - discount_percentage: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage') }}) + discount_percentage: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Percentage rate (from 0 to 100) of discounts applied to the credit note.""" - remaining_credit: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remainingCredit') }}) + remaining_credit: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('remainingCredit'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Unused balance of totalAmount originally raised.""" status: shared_creditnotestatus.CreditNoteStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) - sub_total: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal') }}) + sub_total: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Value of the credit note, including discounts and excluding tax.""" - total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }}) + total_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Total amount of credit that has been applied to the customer's accounts receivable""" - total_discount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount') }}) + total_discount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Any discounts applied to the credit note amount.""" - total_tax_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount') }}) + total_tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Any tax applied to the credit note amount.""" - additional_tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalTaxAmount'), 'exclude': lambda f: f is None }}) - additional_tax_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalTaxPercentage'), 'exclude': lambda f: f is None }}) + additional_tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalTaxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) + additional_tax_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalTaxPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) allocated_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allocatedOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -71,59 +72,59 @@ class CreditNote: r"""Friendly reference for the credit note.""" 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | """ - customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) + customer_ref: Optional[shared_accountingcustomerref.AccountingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""Identifier for the credit note, unique to the company in the accounting platform.""" issue_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -139,8 +140,8 @@ class CreditNote: source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ withholding_tax: Optional[list[shared_withholdingtaxitems.WithholdingTaxitems]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('withholdingTax'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/creditnotelineitem.py b/previous-versions/accounting/src/codataccounting/models/shared/creditnotelineitem.py index 0c16bf727..7038cac4f 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/creditnotelineitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/creditnotelineitem.py @@ -2,15 +2,17 @@ from __future__ import annotations import dataclasses +from ..shared import accountingcustomerref as shared_accountingcustomerref from ..shared import accountref as shared_accountref from ..shared import billedtotype1 as shared_billedtotype1 -from ..shared import customerref as shared_customerref +from ..shared import invoiceto as shared_invoiceto from ..shared import itemref as shared_itemref from ..shared import projectref as shared_projectref from ..shared import taxrateref as shared_taxrateref from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -22,8 +24,13 @@ class CreditNoteLineItemTracking: category_refs: list[shared_trackingcategoryref.TrackingCategoryRef] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('categoryRefs') }}) is_billed_to: shared_billedtotype1.BilledToType1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) is_rebilled_to: shared_billedtotype1.BilledToType1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) - customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) + customer_ref: Optional[shared_accountingcustomerref.AccountingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) project_ref: Optional[shared_projectref.ProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }}) + record_ref: Optional[shared_invoiceto.InvoiceTo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }}) + r"""Links the current record to the underlying record or data type that created it. + + For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. + """ @@ -32,29 +39,29 @@ class CreditNoteLineItemTracking: @dataclasses.dataclass class CreditNoteLineItem: - quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }}) + quantity: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Number of units of the goods or service for which credit has been issued.""" - unit_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount') }}) + unit_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Unit price of the goods or service.""" account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Friendly name of each line item. For example, the goods or service for which credit has been issued.""" - discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }}) + discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Value of any discounts applied.""" - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Percentage rate of any discount applied to the line item.""" is_direct_income: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isDirectIncome'), 'exclude': lambda f: f is None }}) item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }}) - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of credit associated with the line item, including discounts but excluding tax.""" - tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }}) + tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of tax associated with the line item.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -62,14 +69,14 @@ class CreditNoteLineItem: - Invoice line items - Items """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the line item, including discounts and tax.""" tracking: Optional[CreditNoteLineItemTracking] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tracking'), 'exclude': lambda f: f is None }}) r"""Categories, and a project and customer, against which the item is tracked.""" tracking_category_refs: Optional[list[shared_trackingcategoryref.TrackingCategoryRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategoryRefs'), 'exclude': lambda f: f is None }}) r"""Reference to the tracking categories to which the line item is linked. - - Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/creditnotes.py b/previous-versions/accounting/src/codataccounting/models/shared/creditnotes.py index f1ce215af..38d996dba 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/creditnotes.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/creditnotes.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class CreditNotes: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/customer.py b/previous-versions/accounting/src/codataccounting/models/shared/customer.py index f11268899..32b87c4e8 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/customer.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/customer.py @@ -17,11 +17,11 @@ @dataclasses.dataclass class Customer: r"""> 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/accounting-api#/schemas/Invoice). """ status: shared_customerstatus.CustomerStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) @@ -36,11 +36,11 @@ class Customer: r"""Name of the customer as recorded in the accounting system, typically the company name.""" default_currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('defaultCurrency'), '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. """ email_address: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('emailAddress'), 'exclude': lambda f: f is None }}) @@ -56,8 +56,8 @@ class Customer: source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ tax_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxNumber'), 'exclude': lambda f: f is None }}) r"""Company tax number.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/customers.py b/previous-versions/accounting/src/codataccounting/models/shared/customers.py index 8576fb286..bcaa4811a 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/customers.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/customers.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Customers: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/dataset.py b/previous-versions/accounting/src/codataccounting/models/shared/dataset.py index 333ddd512..43bdce50f 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/dataset.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/dataset.py @@ -35,7 +35,6 @@ class DatasetStatus(str, Enum): @dataclasses.dataclass class Dataset: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) connection_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('connectionId') }}) id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) @@ -44,20 +43,20 @@ class Dataset: progress: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('progress') }}) requested: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requested') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -66,20 +65,20 @@ class Dataset: status: DatasetStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) completed: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completed'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/directcost.py b/previous-versions/accounting/src/codataccounting/models/shared/directcost.py index 291a23c95..538509760 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/directcost.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/directcost.py @@ -9,6 +9,7 @@ from ..shared import supplementaldata as shared_supplementaldata from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -17,44 +18,46 @@ @dataclasses.dataclass class DirectCost: r"""> **Language tip:** Direct costs may also be referred to as **Spend transactions**, **Spend money transactions**, or **Payments** in various accounting platforms. - + > View the coverage for direct costs in the Data coverage explorer. - + ## Overview - + + Direct costs are the expenses associated with a business' operations. For example, purchases of raw materials and service fees are considered direct costs. + Direct costs include: * Purchasing an item and paying it off at the point of the purchase * Receiving cash from a refunded item if the refund is made by the supplier * Withdrawing money from a bank account * Writing a cheque - + Direct costs is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ currency: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency') }}) 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. """ issue_date: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -64,35 +67,35 @@ class DirectCost: r"""An array of line items.""" payment_allocations: list[shared_items.Items] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentAllocations') }}) r"""An array of payment allocations.""" - sub_total: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal') }}) + sub_total: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""The total amount of the direct costs, excluding any taxes.""" - tax_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount') }}) + tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""The total amount of tax on the direct costs.""" - total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }}) + total_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""The amount of the direct costs, inclusive of tax.""" 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 }}) r"""The customer or supplier for the transfer, if available.""" - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -110,8 +113,8 @@ class DirectCost: source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/directcostlineitem.py b/previous-versions/accounting/src/codataccounting/models/shared/directcostlineitem.py index 1e23a90c4..3928d39fd 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/directcostlineitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/directcostlineitem.py @@ -9,6 +9,7 @@ from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -16,12 +17,12 @@ @dataclasses.dataclass class DirectCostLineItem: - quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }}) + quantity: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Number of units of goods or services received. - + Note: If the platform does not provide this information, the quantity will be mapped as 1. """ - unit_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount') }}) + unit_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Price of each unit of goods or services. Note: If the platform does not provide this information, the unit amount will be mapped to the total amount. """ @@ -29,20 +30,20 @@ class DirectCostLineItem: r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Friendly name of the goods or services.""" - discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }}) + discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Discount amount for the line before tax.""" - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Discount percentage for the line before tax.""" item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }}) - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of the line, inclusive of discounts but exclusive of tax.""" - tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }}) + tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of tax for the line.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -50,13 +51,13 @@ class DirectCostLineItem: - Invoice line items - Items """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the line, including tax.""" tracking: Optional[shared_tracking.Tracking] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tracking'), 'exclude': lambda f: f is None }}) tracking_category_refs: Optional[list[shared_trackingcategoryref.TrackingCategoryRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategoryRefs'), 'exclude': lambda f: f is None }}) r"""Collection of categories against which this direct cost is tracked. - - Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/directcosts.py b/previous-versions/accounting/src/codataccounting/models/shared/directcosts.py index e552bbece..4e600020b 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/directcosts.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/directcosts.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class DirectCosts: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/directincome.py b/previous-versions/accounting/src/codataccounting/models/shared/directincome.py index 697324502..8cb949de4 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/directincome.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/directincome.py @@ -9,6 +9,7 @@ from ..shared import supplementaldata as shared_supplementaldata from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -17,44 +18,46 @@ @dataclasses.dataclass class DirectIncome: r"""> **Language tip:** Direct incomes may also be referred to as **Receive transactions**, **Receive money transactions**, **Sales receipts**, or **Cash sales** in various accounting platforms. - + > View the coverage for direct incomes in the Data coverage explorer. - + ## Overview - + + Direct incomes are incomes received directly from the business' operations. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes. + Direct incomes include: - + - Selling an item directly to a contact, and receiving payment at the point of the sale. - Refunding an item in cash to a contact. - Depositing money into a bank account. - + Direct incomes is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ currency: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency') }}) 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. """ issue_date: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -63,35 +66,35 @@ class DirectIncome: line_items: list[shared_directincomelineitem.DirectIncomeLineItem] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lineItems') }}) r"""An array of line items.""" payment_allocations: list[shared_items.Items] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentAllocations') }}) - sub_total: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal') }}) + sub_total: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""The total amount of the direct incomes, excluding any taxes.""" - tax_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount') }}) + tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""The total amount of tax on the direct incomes.""" - total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }}) + total_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""The amount of the direct incomes, inclusive of tax.""" 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 }}) r"""The customer or supplier for the transfer, if available.""" - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -108,8 +111,8 @@ class DirectIncome: source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/directincomelineitem.py b/previous-versions/accounting/src/codataccounting/models/shared/directincomelineitem.py index fc5214455..9f2e281fe 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/directincomelineitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/directincomelineitem.py @@ -8,6 +8,7 @@ from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -15,12 +16,12 @@ @dataclasses.dataclass class DirectIncomeLineItem: - quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }}) + quantity: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""The number of units of goods or services received. - + Note: If the platform does not provide this information, the quantity will be mapped as 1. """ - unit_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount') }}) + unit_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""The price of each unit of goods or services. Note: If the platform does not provide this information, the unit amount will be mapped to the total amount. """ @@ -28,22 +29,22 @@ class DirectIncomeLineItem: r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""A user-friendly name of the goods or services.""" - discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }}) + discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Discount amount for the line before tax.""" - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Discount percentage for the line before tax.""" item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }}) - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""The amount of the line, inclusive of discounts, but exclusive of tax.""" - tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }}) + tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""The amount of tax for the line. Note: If the platform does not provide this information, the quantity will be mapped as 0.00. """ tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -51,7 +52,7 @@ class DirectIncomeLineItem: - Invoice line items - Items """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""The total amount of the line, including tax.""" tracking_category_refs: Optional[list[shared_trackingcategoryref.TrackingCategoryRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategoryRefs'), 'exclude': lambda f: f is None }}) r"""An array of categories against which this direct cost is tracked.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/directincomes.py b/previous-versions/accounting/src/codataccounting/models/shared/directincomes.py index be73d491d..a27eed048 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/directincomes.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/directincomes.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class DirectIncomes: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/schema.py b/previous-versions/accounting/src/codataccounting/models/shared/errormessage.py similarity index 95% rename from previous-versions/accounting/src/codataccounting/models/shared/schema.py rename to previous-versions/accounting/src/codataccounting/models/shared/errormessage.py index d62d2f5bc..d225013bf 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/schema.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/errormessage.py @@ -10,8 +10,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass -class Schema: - r"""Your `query` parameter was not correctly formed""" +class ErrorMessage: can_be_retried: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canBeRetried'), 'exclude': lambda f: f is None }}) correlation_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('correlationId'), 'exclude': lambda f: f is None }}) detailed_error_code: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detailedErrorCode'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/invoice.py b/previous-versions/accounting/src/codataccounting/models/shared/invoice.py index 0a6456557..622406ff1 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/invoice.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/invoice.py @@ -2,7 +2,7 @@ from __future__ import annotations import dataclasses -from ..shared import customerref as shared_customerref +from ..shared import accountingcustomerref as shared_accountingcustomerref from ..shared import invoicelineitem as shared_invoicelineitem from ..shared import invoicestatus as shared_invoicestatus from ..shared import items as shared_items @@ -12,6 +12,7 @@ from ..shared import withholdingtaxitems as shared_withholdingtaxitems from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -24,49 +25,49 @@ class Invoice: > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company issued an invoice, and is owed money (accounts receivable) we call this an Invoice. > > See [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) for the accounts payable equivalent of bills. - + View the coverage for invoices in the Data coverage explorer. - + ## Overview - + An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/accounting-api#/schemas/Customer). - + In Codat, an invoice contains details of: - + - The timeline of the invoice—when it was raised, marked as paid, last edited, and so on. - How much the invoice is for, what portion of the invoice is tax or discounts, and what currency the amounts are represented in. - Who the invoice has been raised to; the _customer_. - The breakdown of what the invoice is for; the _line items_. - Any [payments](https://docs.codat.io/accounting-api#/schemas/Payment) assigned to the invoice; the _payment allocations_. - + > **Invoice PDF downloads** > > You can download a PDF version of an invoice for supported integrations. > > The filename will be invoice-{number}.pdf. - + > **Referencing an invoice in Sage 50 and ClearBooks** > > In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same. """ - amount_due: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amountDue') }}) + amount_due: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amountDue'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount outstanding on the invoice.""" issue_date: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -74,74 +75,74 @@ class Invoice: """ status: shared_invoicestatus.InvoiceStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""Current state of the invoice: - + - `Draft` - Invoice hasn't been submitted to the supplier. It may be in a pending state or is scheduled for future submission, for example by email. - `Submitted` - Invoice is no longer a draft. It has been processed and, or, sent to the customer. In this state, it will impact the ledger. It also has no payments made against it (amountDue == totalAmount). - `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount (0 < amountDue < totalAmount). - `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid (amountDue == 0). - `Void` - An invoice can become Void when it's deleted, refunded, written off, or cancelled. A voided invoice may still be PartiallyPaid, and so all outstanding amounts on voided invoices are removed from the accounts receivable account. """ - total_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount') }}) + total_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount of the invoice, inclusive of tax.""" - total_tax_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount') }}) + total_tax_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount of tax on the invoice.""" - additional_tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalTaxAmount'), 'exclude': lambda f: f is None }}) - additional_tax_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalTaxPercentage'), 'exclude': lambda f: f is None }}) + additional_tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalTaxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) + additional_tax_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('additionalTaxPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, '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"""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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | """ - customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + customer_ref: Optional[shared_accountingcustomerref.AccountingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Percentage rate (from 0 to 100) of discounts applied to the invoice. For example: A 5% discount will return a value of `5`, not `0.05`.""" due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -159,20 +160,20 @@ class Invoice: r"""Any additional information about the invoice. Where possible, Codat links to a data field in the accounting platform that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting platform to the customer.""" paid_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paidOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -183,14 +184,14 @@ class Invoice: sales_order_refs: Optional[list[shared_salesorderref.SalesOrderRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('salesOrderRefs'), 'exclude': lambda f: f is None }}) r"""List of references to related Sales orders.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the invoice excluding any taxes.""" supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ - total_discount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'exclude': lambda f: f is None }}) + total_discount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Numerical value of discounts applied to the invoice.""" withholding_tax: Optional[list[shared_withholdingtaxitems.WithholdingTaxitems]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('withholdingTax'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/invoiceitem.py b/previous-versions/accounting/src/codataccounting/models/shared/invoiceitem.py index 820b826e2..d85c57d0e 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/invoiceitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/invoiceitem.py @@ -6,6 +6,7 @@ from ..shared import taxrateref as shared_taxrateref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -20,9 +21,9 @@ class InvoiceItem: r"""Short description of the product or service that has been bought by the customer.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -30,7 +31,7 @@ class InvoiceItem: - Invoice line items - Items """ - unit_price: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitPrice'), 'exclude': lambda f: f is None }}) + unit_price: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitPrice'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Unit price of the product or service.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/invoicelineitem.py b/previous-versions/accounting/src/codataccounting/models/shared/invoicelineitem.py index 94e8314e9..93ed9832d 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/invoicelineitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/invoicelineitem.py @@ -9,6 +9,7 @@ from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -16,29 +17,29 @@ @dataclasses.dataclass class InvoiceLineItem: - quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }}) + quantity: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Number of units of goods or services provided.""" - unit_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount') }}) + unit_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Price of each unit of goods or services.""" account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Friendly name of the goods or services provided.""" - discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }}) + discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Numerical value of any discounts applied.""" - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Percentage rate (from 0 to 100) of any discounts applied to the unit amount.""" is_direct_income: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isDirectIncome'), 'exclude': lambda f: f is None }}) item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }}) - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of the line, inclusive of discounts but exclusive of tax.""" - tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }}) + tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of tax for the line.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -46,14 +47,14 @@ class InvoiceLineItem: - Invoice line items - Items """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the line, including tax. When pushing invoices to Xero, the total amount is exclusive of tax to allow automatic calculations if a tax rate or tax amount is not specified.""" tracking: Optional[shared_propertiestracking1.Propertiestracking1] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tracking'), 'exclude': lambda f: f is None }}) r"""Categories, and a project and customer, against which the item is tracked.""" tracking_category_refs: Optional[list[shared_trackingcategoryref.TrackingCategoryRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategoryRefs'), 'exclude': lambda f: f is None }}) r"""Reference to the tracking categories to which the line item is linked. - - Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/invoices.py b/previous-versions/accounting/src/codataccounting/models/shared/invoices.py index 990821407..0ff14f2a5 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/invoices.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/invoices.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Invoices: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/invoicestatus.py b/previous-versions/accounting/src/codataccounting/models/shared/invoicestatus.py index 1f7a92626..61e70027c 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/invoicestatus.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/invoicestatus.py @@ -5,7 +5,7 @@ class InvoiceStatus(str, Enum): r"""Current state of the invoice: - + - `Draft` - Invoice hasn't been submitted to the supplier. It may be in a pending state or is scheduled for future submission, for example by email. - `Submitted` - Invoice is no longer a draft. It has been processed and, or, sent to the customer. In this state, it will impact the ledger. It also has no payments made against it (amountDue == totalAmount). - `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount (0 < amountDue < totalAmount). diff --git a/previous-versions/accounting/src/codataccounting/models/shared/invoiceto.py b/previous-versions/accounting/src/codataccounting/models/shared/invoiceto.py index 7fd43d4f8..ab4470971 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/invoiceto.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/invoiceto.py @@ -11,17 +11,12 @@ @dataclasses.dataclass class InvoiceTo: - r"""Links to the underlying record or data type. - - Found on: - - - Journal entries - - Account transactions - - Invoices - - Transfers + r"""Links the current record to the underlying record or data type that created it. + + For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. """ data_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) - r"""Name of the 'dataType'.""" + r"""Allowed name of the 'dataType'.""" id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""'id' of the underlying record or data type.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/item.py b/previous-versions/accounting/src/codataccounting/models/shared/item.py index 24d2a6ab7..a8a70127d 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/item.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/item.py @@ -17,9 +17,9 @@ @dataclasses.dataclass class Item: r"""> View the coverage for items in the Data coverage explorer. - + ## Overview - + **Items** allow your customers to save and track details of the products and services that they buy and sell. """ is_bill_item: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBillItem') }}) @@ -28,11 +28,11 @@ class Item: r"""Whether you can use this item for invoices.""" item_status: shared_itemstatus.ItemStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemStatus') }}) r"""Current state of the item, either: - + - `Active`: Available for use - `Archived`: Unavailable - `Unknown` - + Due to a [limitation in Xero's API](https://docs.codat.io/integrations/accounting/xero/xero-faq#why-do-all-of-my-items-from-xero-have-their-status-as-unknown), all items from Xero are mapped as `Unknown`. """ type: shared_itemtype.ItemType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/items.py b/previous-versions/accounting/src/codataccounting/models/shared/items.py index cf6104253..7ce7179b1 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/items.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/items.py @@ -5,6 +5,7 @@ from ..shared import paymentallocationpayment as shared_paymentallocationpayment from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -14,20 +15,20 @@ class ItemsAllocation: allocated_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allocatedOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -35,41 +36,41 @@ class ItemsAllocation: """ 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR. - + Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). - + For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. - + ## Examples with base currency of GBP - + | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | | :--------------- | :------------- | :------------ | :------------------------- | | **USD** | $20 | 0.781 | £15.62 | | **EUR** | €20 | 0.885 | £17.70 | | **RUB** | ₽20 | 0.011 | £0.22 | - + ## Examples with base currency of USD - + | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | | :--------------- | :------------- | :------------ | :------------------------- | | **GBP** | £20 | 1.277 | $25.54 | | **EUR** | €20 | 1.134 | $22.68 | | **RUB** | ₽20 | 0.015 | $0.30 | """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""The total amount that has been allocated.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/items1.py b/previous-versions/accounting/src/codataccounting/models/shared/items1.py index c7fd50f17..9894aa53a 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/items1.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/items1.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Items1: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/itemstatus.py b/previous-versions/accounting/src/codataccounting/models/shared/itemstatus.py index cbacf030d..484c39bf8 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/itemstatus.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/itemstatus.py @@ -5,11 +5,11 @@ class ItemStatus(str, Enum): r"""Current state of the item, either: - + - `Active`: Available for use - `Archived`: Unavailable - `Unknown` - + Due to a [limitation in Xero's API](https://docs.codat.io/integrations/accounting/xero/xero-faq#why-do-all-of-my-items-from-xero-have-their-status-as-unknown), all items from Xero are mapped as `Unknown`. """ UNKNOWN = 'Unknown' diff --git a/previous-versions/accounting/src/codataccounting/models/shared/journal.py b/previous-versions/accounting/src/codataccounting/models/shared/journal.py index c9c550313..0698abc96 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/journal.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/journal.py @@ -14,44 +14,44 @@ @dataclasses.dataclass class Journal: r"""> **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/accounting-api#/schemas/JournalEntry) data type - + > View the coverage for journals in the Data coverage explorer. - + ## Overview - + In accounting software, journals are used to record all the financial transactions of a company. Each transaction in a journal is represented by a separate [journal entry](https://docs.codat.io/accounting-api#/schemas/JournalEntry). These entries are used to create the general ledger, which is then used to create the financial statements of a business. - + When a company records all their transactions in a single journal, it can become large and difficult to maintain and track. This is why large companies often use multiple journals (also known as subjournals) to categorize and manage journal entries. - + Such journals can be divided into two categories: - + - Special journals: journals used to record specific types of transactions; for example, a purchases journal, a sales journal, or a cash management journal. - General journals: journals used to record transactions that fall outside the scope of the special journals. - + Multiple journals or subjournals are used in the following Codat integrations: - + - [Sage Intacct](https://docs.codat.io/integrations/accounting/sage-intacct/accounting-sage-intacct) (mandatory) - [Exact Online](https://docs.codat.io/integrations/accounting/exact-online/accounting-exact-online) (mandatory) - [Oracle NetSuite](https://docs.codat.io/integrations/accounting/netsuite/accounting-netsuite) (optional) - + > When pushing journal entries to an accounting platform that doesn’t support multiple journals (multi-book accounting), the entries will be linked to the platform-generic journal. The Journals data type will only include one object. """ created_on: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdOn'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/journalentries.py b/previous-versions/accounting/src/codataccounting/models/shared/journalentries.py index 9210bcd0a..cdb7ac11d 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/journalentries.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/journalentries.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class JournalEntries: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/journalentry.py b/previous-versions/accounting/src/codataccounting/models/shared/journalentry.py index 3b9d8bc1a..35663a4be 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/journalentry.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/journalentry.py @@ -17,44 +17,44 @@ @dataclasses.dataclass class JournalEntry: r"""> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/accounting-api#/schemas/Journal) data type - + > View the coverage for journal entries in the Data coverage explorer. - + ## Overview - + A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/accounting-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance. - + A journal entry line item is a single transaction line on the journal entry. For example: - + - When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items. - When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue. - + In Codat a journal entry contains details of: - + - The date on which the entry was created and posted. - Itemised lines, including amounts and currency. - A reference to the associated accounts. - A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger. - + > **Pushing journal entries** > Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency. """ created_on: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdOn'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -72,57 +72,52 @@ class JournalEntry: modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }}) posted_on: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('postedOn'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ record_ref: Optional[shared_invoiceto.InvoiceTo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }}) - r"""Links to the underlying record or data type. - - Found on: - - - Journal entries - - Account transactions - - Invoices - - Transfers + r"""Links the current record to the underlying record or data type that created it. + + For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. """ source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ updated_on: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updatedOn'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/journalline.py b/previous-versions/accounting/src/codataccounting/models/shared/journalline.py index 3ca0b209d..3b72515f9 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/journalline.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/journalline.py @@ -6,6 +6,7 @@ from ..shared import propertiestracking2 as shared_propertiestracking2 from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -13,7 +14,7 @@ @dataclasses.dataclass class JournalLine: - net_amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netAmount') }}) + net_amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netAmount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative.""" account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/journals.py b/previous-versions/accounting/src/codataccounting/models/shared/journals.py index 04aa0146e..bb25bb161 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/journals.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/journals.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Journals: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/payment.py b/previous-versions/accounting/src/codataccounting/models/shared/payment.py index d4141e49d..df4d85445 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/payment.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/payment.py @@ -2,15 +2,15 @@ from __future__ import annotations import dataclasses +from ..shared import accountingcustomerref as shared_accountingcustomerref from ..shared import accountref as shared_accountref -from ..shared import customerref as shared_customerref from ..shared import metadata as shared_metadata from ..shared import paymentline as shared_paymentline -from ..shared import paymentmethodref as shared_paymentmethodref from ..shared import supplementaldata as shared_supplementaldata from codataccounting import utils from dataclasses_json import Undefined, dataclass_json -from typing import Optional +from decimal import Decimal +from typing import Any, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @@ -20,70 +20,70 @@ class Payment: r"""> **Payments or bill payments?** > > In Codat, payments represent accounts receivable only. For accounts payable, see [bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment). These include [bills](https://docs.codat.io/accounting-api#/schemas/Bill) and credit notes against bills. - + > View the coverage for payments in the Data coverage explorer. - + ## Overview - + Payments include all accounts receivable transaction data. This includes [invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote). - + A payment in Codat usually represents an allocation of money within any customer accounts receivable account. This includes, but is not strictly limited to: - + - A payment made against an invoice, like a credit card, cheque, or cash payment. - An allocation of a customer's credit note, either to an invoice or maybe a refund. - A payment made directly to that accounts receivable account. This might be an overpayment or a prepayment. It might also be the refund of a payment made directly to an accounts receivable account. - + Depending on the payments allowed by the underlying accounting package, some payment types may be combined. Please see the example for more details. - + In Codat, a payment contains details of: - + - When the payment was recorded in the accounting system. - How much it is for and in what currency that amount is in. - Who the payment was _paid by_ – the _customer_. - The payment method used. - The breakdown of the types of payments – the _line items_. - + Payments is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). - + ## Payment types - + ## Payment of an invoice - + A payment paying a single invoice has one entry in its `lines` array. This **line** has the following properties: - + - An _amount_ that indicates the amount of the invoice that was paid. This is always positive. - A **links** array containing one element with the following properties: - A **type** that indicates the type of **link**, in this case an `Invoice`. - An **id** that contains the ID of the invoice that was paid. - An **amount** for the link. The sum of the **line.amount** and the **links.amount** must equal `0`. - + The **amount** field on the **line** equals the **totalAmount** on the payment. - + ## Payment of multiple invoices - + A single payment can pay multiple invoices. This can be represented in one of two formats depending on how the customer keeps their books: - + - The payment has multiple entries in its **lines** array, one for each invoice that is paid. Each line follows the example and rules described in [Payment of an invoice](#payment-of-an-invoice). - The payment has a line with multiple links to each invoice. This occurs when the proportion of the original payment allocated to each invoice is not available. - + Each **line** has the same properties as those described in [Payment of an invoice](#payment-of-an-invoice), with the **amount** indicating how much of the payment was allocated to the invoice. The sum of line amounts equals the **totalAmount** on the payment. - + ## Payments and refunds on account - + A payment on account, that is a payment that doesn’t pay a specific invoice, has one entry in its lines array. The **line** has the following properties: - + - A **totalAmount** that indicates the amount paid by a customer or refunded to them by a company. A payment to the customer is always negative. A refund is always positive. - A **links** array containing one element with the following properties: - A **type** that indicates the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`. - The **id** containing the ID of the customer. - The **amount** for the link is `0` – the **totalAmount** _or_ the amount of the payment or refund. - + It is possible to have a payment that is part _on account_ and part _allocated_ to an invoice. Each line should follow the examples above. - + ## Using a credit note to pay an invoice - + The payment of an invoice using a credit note has one entry in its **lines** array. This **line** has the following properties: - + - An **amount** that indicates the amount of money moved, which in this case is `0`, as the credit note and invoice allocation must balance each other. - A **links** array containing two elements: - The first **link** has: @@ -92,73 +92,73 @@ class Payment: - The second **link** has: - A **type** that indicates the type of **link**, in this case a `CreditNote`. - An **id** that contains the ID of the credit note used by this payment. - + The **amount** field on the **line** equals the **totalAmount** on the payment. - + ## Refunding a credit note - + A payment refunding a credit note has one entry in its **lines** array. This **line** has the following properties: - + - An **amount** that indicates the amount of the credit note that was refunded. This is always negative for a refund. - A **links** array that contains one element with the following properties: - A **type** that indicates the type of **link**, in this case a `CreditNote`. - An **id** that contains the ID of the credit note that was refunded. - + The **totalAmount** field on the payment equals the **amount** field of the **line**. These are both negative, as this is money leaving accounts receivable. - + ## Refunding a payment - + If a payment is refunded, for example, if a customer overpaid an invoice and the overpayment is returned to the customer, there are two payment records: - + - One for the incoming over payment. - Another for the outgoing refund. - + The payment issuing the refund has a negative **totalAmount**. This payment also has one entry in its lines array with the following properties: - + - An **amount** that indicates the amount that was refunded. This is always negative. - A **links** array that contains one element with the following properties: - A **type** that indicates the type of **link**, in this case a `Payment`. - An **id** that contains the ID of the payment that was refunded. - + The **amount** field on the **line** equals the **totalAmount** on the payment and is negative, as this is money leaving accounts receivable. - + The payment that was refunded has a line where the **amount** is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was used to partly pay an invoice. - + For example: A £1,050 payment on a £1,000 invoice with a refund of £50 has two lines: - + - One for £1,000 linked to the invoice that was paid. - Another for £50 linked to the payment that refunded the overpayment with a** type** of `Refund` and an ID that corresponds to the payment. - + The **line** linked to the payment has the following properties: - + - An **amount** that indicates the amount that was refunded. This is positive as its money that was added to accounts receivable. It's balanced out by the negative amount of the refund. - A **links** array containing one element with the following properties: - A **type** that indicates the type of **link**, in this case a `Refund`. - An **id** that contains the ID of the payment that refunded this line. - + > **Support for linked payments** > > Not all accounting packages support linking payments in this way. In some platforms, you may see a payment on account and a refund on account. - + ## Foreign currencies - + There are two types of currency rate that are included in the payments data type: - + Payment currency rate: - + - Base currency of the accounts receivable account. - Foreign currency of the payment. - + Payment line link currency rate: - + - Base currency of the item the link represents. - Foreign currency of the payment. - + These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a payment is applied to an item in a currency that doesn't match either: - + - The base currency for the accounts receivable account. - The currency of the item. - + ```json title=\"Currency rate example\" { \"id\": \"123\", @@ -180,17 +180,17 @@ class Payment: ] } ``` - - - + + + ## Example data - + > **Object properties** > > For the sake of brevity, the examples here may omit properties from objects. For the full object definition, see [Payments](https://api.codat.io/swagger/index.html#/Payments). - + ## Simple examples - + ```json title=\"Payment for invoice\" { \"totalAmount\": 1000, @@ -208,9 +208,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Allocation of credit note\" { \"totalAmount\": 0, @@ -233,9 +233,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Payment of invoice and payment on account\" { \"totalAmount\": 2000, @@ -263,9 +263,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Refund of credit note\" { \"totalAmount\": -1000, @@ -283,9 +283,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Refund on accounts receivable account\" { \"totalAmount\": -1000, @@ -303,9 +303,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Linked refund on accounts receivable account\" { \"id\" : \"payment-001\", @@ -340,9 +340,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Using a credit note and cash to pay an invoice\" { \"totalAmount\": 250, @@ -375,11 +375,11 @@ class Payment: ] } ``` - - - + + + ## Complex examples - + ```json title=\"Use two credit notes and 1000 in to \"bank\" (cash, cheque etc.) to pay invoice\" { \"totalAmount\": 1000, @@ -427,9 +427,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Pay an invoice with two credit notes and cash, with 1000 left 'on account'\" { \"totalAmount\": 2000, @@ -487,9 +487,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Two credit notes pay two invoices with no allocation amount specified\" { \"totalAmount\": 0, @@ -522,9 +522,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Two credit notes and cash pay three invoices with no allocation amount specified, and refund cash\" { \"totalAmount\": 2000, @@ -588,11 +588,11 @@ class Payment: ] } ``` - - - + + + In this example, a payment on account is used to pay the same invoice in January and again in February. - + ```json title=\"January\" { \"id\": \"001\", @@ -622,9 +622,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"February\" { \"id\": \"001\", @@ -664,9 +664,9 @@ class Payment: ] } ``` - - - + + + ```json title=\"Two credit notes and some cash pay two invoices with no allocations specified\" { \"totalAmount\": 500, @@ -698,20 +698,20 @@ class Payment: """ date_: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('date') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -721,41 +721,41 @@ class Payment: r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | """ - customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) + customer_ref: Optional[shared_accountingcustomerref.AccountingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""Identifier for the payment, unique to the company in the accounting platform.""" lines: Optional[list[shared_paymentline.PaymentLine]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lines'), 'exclude': lambda f: f is None }}) @@ -764,16 +764,16 @@ class Payment: modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('modifiedDate'), 'exclude': lambda f: f is None }}) note: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('note'), 'exclude': lambda f: f is None }}) r"""Any additional information associated with the payment.""" - payment_method_ref: Optional[shared_paymentmethodref.PaymentMethodRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentMethodRef'), 'exclude': lambda f: f is None }}) + payment_method_ref: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentMethodRef'), 'exclude': lambda f: f is None }}) reference: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference'), 'exclude': lambda f: f is None }}) r"""Friendly reference for the payment.""" source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of the payment in the payment currency. This value should never change and represents the amount of money paid into the customer's account.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/paymentallocationpayment.py b/previous-versions/accounting/src/codataccounting/models/shared/paymentallocationpayment.py index aac8781f3..f056ce106 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/paymentallocationpayment.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/paymentallocationpayment.py @@ -5,6 +5,7 @@ from ..shared import accountref as shared_accountref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -16,34 +17,34 @@ class PaymentAllocationPayment: r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }}) 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -56,20 +57,20 @@ class PaymentAllocationPayment: r"""Notes attached to the allocated payment.""" paid_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paidOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -77,7 +78,7 @@ class PaymentAllocationPayment: """ reference: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference'), 'exclude': lambda f: f is None }}) r"""Reference to the allocated payment.""" - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount that was paid.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/paymentline.py b/previous-versions/accounting/src/codataccounting/models/shared/paymentline.py index 5fa3994ff..1462bb13b 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/paymentline.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/paymentline.py @@ -5,6 +5,7 @@ from ..shared import paymentlinelink as shared_paymentlinelink from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -12,24 +13,24 @@ @dataclasses.dataclass class PaymentLine: - amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }}) + amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Amount in the payment currency.""" allocated_on_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('allocatedOnDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/paymentlinelink.py b/previous-versions/accounting/src/codataccounting/models/shared/paymentlinelink.py index 63886908d..55d1511a5 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/paymentlinelink.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/paymentlinelink.py @@ -5,6 +5,7 @@ from ..shared import paymentlinktype as shared_paymentlinktype from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -25,32 +26,32 @@ class PaymentLineLink: `Manual Journal` `Discount` - ID refers to the payment """ - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) + amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount by which the balance of the linked entity is altered, in the currency of the linked entity. A negative link amount _reduces_ the outstanding amount on the accounts receivable account. A positive link amount _increases_ the outstanding amount on the accounts receivable account. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | diff --git a/previous-versions/accounting/src/codataccounting/models/shared/paymentmethod.py b/previous-versions/accounting/src/codataccounting/models/shared/paymentmethod.py index 0738e101d..d0c6df53c 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/paymentmethod.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/paymentmethod.py @@ -15,9 +15,9 @@ @dataclasses.dataclass class PaymentMethod: r"""> View the coverage for payment methods in the Data coverage explorer. - + ## Overview - + A Payment Method represents the payment method(s) used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/accounting-api#/schemas/Payment). """ id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/paymentmethods.py b/previous-versions/accounting/src/codataccounting/models/shared/paymentmethods.py index d9015ad24..462014ba0 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/paymentmethods.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/paymentmethods.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class PaymentMethods: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/payments.py b/previous-versions/accounting/src/codataccounting/models/shared/payments.py index 64cd2cffc..ef580b1cb 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/payments.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/payments.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Payments: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/profitandlossreport.py b/previous-versions/accounting/src/codataccounting/models/shared/profitandlossreport.py index f2e1a7858..c15d91176 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/profitandlossreport.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/profitandlossreport.py @@ -5,6 +5,7 @@ from ..shared import reportline as shared_reportline from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -12,32 +13,32 @@ @dataclasses.dataclass class ProfitAndLossReport: - gross_profit: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grossProfit') }}) + gross_profit: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('grossProfit'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Gross profit of the company in the given date range.""" - net_operating_profit: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netOperatingProfit') }}) + net_operating_profit: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netOperatingProfit'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Net operating profit of the company in the given date range.""" - net_other_income: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netOtherIncome') }}) + net_other_income: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netOtherIncome'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Net other income of the company in the given date range.""" - net_profit: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netProfit') }}) + net_profit: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('netProfit'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Net profit of the company in the given date range.""" cost_of_sales: Optional[shared_reportline.ReportLine] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('costOfSales'), 'exclude': lambda f: f is None }}) expenses: Optional[shared_reportline.ReportLine] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expenses'), 'exclude': lambda f: f is None }}) from_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fromDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,20 +49,20 @@ class ProfitAndLossReport: other_income: Optional[shared_reportline.ReportLine] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('otherIncome'), 'exclude': lambda f: f is None }}) to_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('toDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/profitandlossreport1.py b/previous-versions/accounting/src/codataccounting/models/shared/profitandlossreport1.py index af1788f9d..4c329526f 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/profitandlossreport1.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/profitandlossreport1.py @@ -14,25 +14,25 @@ @dataclasses.dataclass class ProfitAndLossReport1: r"""> **Language tip:** Profit and loss statement is also referred to as **income statement** under US GAAP (Generally Accepted Accounting Principles). - + > View the coverage for profit and loss in the Data coverage explorer. - + ## Overview - + The purpose of a profit and loss report is to present the financial performance of a company over a specified time period. - + A profit and loss report shows a company's total income and expenses for a specified period of time and whether a profit or loss has been made. - + > **Profit and loss or balance sheet?** > Profit and loss reports summarise the total revenue, expenses, and profit or loss over a specified time period. A balance sheet report presents all assets, liability, and equity for a given date. - - + + **Structure of this report** This report will reflect the structure and line descriptions that the business has set in their own accounting platform. - + **History** By default, Codat pulls (up to) 24 months of profit and loss history for a company. You can adjust this to fetch more history, where available, by updating the `monthsToSync` value for `profitAndLoss` on the [data type settings endpoint](https://docs.codat.io/codat-api#/operations/post-profile-syncSettings). - + **Want to pull this in a standardised structure?** Our [Enhanced Financials](https://docs.codat.io/assess/reports/enhanced-financials/financials) endpoints provide the same report under standardized headings, allowing you to pull it in the same format for all of your business customers. """ @@ -44,20 +44,20 @@ class ProfitAndLossReport1: r"""An array of profit and loss reports.""" earliest_available_month: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('earliestAvailableMonth'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -65,20 +65,20 @@ class ProfitAndLossReport1: """ most_recent_available_month: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('mostRecentAvailableMonth'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. diff --git a/previous-versions/accounting/src/codataccounting/models/shared/propertiestracking.py b/previous-versions/accounting/src/codataccounting/models/shared/propertiestracking.py index 06bc15da8..02a1be392 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/propertiestracking.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/propertiestracking.py @@ -2,8 +2,8 @@ from __future__ import annotations import dataclasses +from ..shared import accountingcustomerref as shared_accountingcustomerref from ..shared import billedtotype as shared_billedtotype -from ..shared import customerref as shared_customerref from ..shared import projectref as shared_projectref from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils @@ -19,7 +19,7 @@ class Propertiestracking: category_refs: list[shared_trackingcategoryref.TrackingCategoryRef] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('categoryRefs') }}) is_billed_to: shared_billedtotype.BilledToType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) is_rebilled_to: shared_billedtotype.BilledToType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) - customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) + customer_ref: Optional[shared_accountingcustomerref.AccountingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) project_ref: Optional[shared_projectref.ProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/propertiestracking1.py b/previous-versions/accounting/src/codataccounting/models/shared/propertiestracking1.py index 9ce4c9139..2f1ef1efe 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/propertiestracking1.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/propertiestracking1.py @@ -2,8 +2,9 @@ from __future__ import annotations import dataclasses +from ..shared import accountingcustomerref as shared_accountingcustomerref from ..shared import billedtotype1 as shared_billedtotype1 -from ..shared import customerref as shared_customerref +from ..shared import invoiceto as shared_invoiceto from ..shared import projectref as shared_projectref from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils @@ -19,7 +20,12 @@ class Propertiestracking1: category_refs: list[shared_trackingcategoryref.TrackingCategoryRef] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('categoryRefs') }}) is_billed_to: shared_billedtotype1.BilledToType1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isBilledTo') }}) is_rebilled_to: shared_billedtotype1.BilledToType1 = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('isRebilledTo') }}) - customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) + customer_ref: Optional[shared_accountingcustomerref.AccountingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) project_ref: Optional[shared_projectref.ProjectRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('projectRef'), 'exclude': lambda f: f is None }}) + record_ref: Optional[shared_invoiceto.InvoiceTo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRef'), 'exclude': lambda f: f is None }}) + r"""Links the current record to the underlying record or data type that created it. + + For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. + """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/purchaseorder.py b/previous-versions/accounting/src/codataccounting/models/shared/purchaseorder.py index 6357cfaad..bb76ff8db 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/purchaseorder.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/purchaseorder.py @@ -9,6 +9,7 @@ from ..shared import supplierref as shared_supplierref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -17,43 +18,43 @@ @dataclasses.dataclass class PurchaseOrder: r"""> View the coverage for purchase orders in the Data coverage explorer. - + ## Overview - + Purchase orders represent a business's intent to purchase goods or services from a supplier and normally include information such as expected delivery dates and shipping details. - + This information can be used to provide visibility on a business's expected payables and to track a purchase through the full procurement process. """ 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -62,20 +63,20 @@ class PurchaseOrder: """ delivery_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('deliveryDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -83,20 +84,20 @@ class PurchaseOrder: """ expected_delivery_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expectedDeliveryDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -106,20 +107,20 @@ class PurchaseOrder: r"""Identifier for the purchase order, unique for the company in the accounting platform.""" issue_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -133,20 +134,20 @@ class PurchaseOrder: r"""Any additional information associated with the purchase order.""" payment_due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('paymentDueDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -159,15 +160,15 @@ class PurchaseOrder: source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) status: Optional[shared_purchaseorderstatus.PurchaseOrderStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Current state of the purchase order""" - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the purchase order, including discounts but excluding tax.""" supplier_ref: Optional[shared_supplierref.SupplierRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierRef'), 'exclude': lambda f: f is None }}) r"""Reference to the supplier the record relates to.""" - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the purchase order, including discounts and tax.""" - total_discount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'exclude': lambda f: f is None }}) + total_discount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total value of any discounts applied to the purchase order.""" - total_tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount'), 'exclude': lambda f: f is None }}) + total_tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of tax included in the purchase order.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/purchaseorderlineitem.py b/previous-versions/accounting/src/codataccounting/models/shared/purchaseorderlineitem.py index 4014aac4a..25bd8fe25 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/purchaseorderlineitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/purchaseorderlineitem.py @@ -8,6 +8,7 @@ from ..shared import trackingcategoryref as shared_trackingcategoryref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -19,22 +20,22 @@ class PurchaseOrderLineItem: r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Description of the goods / services that have been ordered.""" - discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }}) + discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Value of any discounts applied.""" - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Percentage rate (from 0 to 100) of any discounts applied to the unit amount.""" item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }}) - quantity: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'exclude': lambda f: f is None }}) + quantity: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Number of units that have been ordered.""" - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of the line, inclusive of discounts but exclusive of tax.""" - tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }}) + tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of tax for the line.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -42,11 +43,11 @@ class PurchaseOrderLineItem: - Invoice line items - Items """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the line, inclusive of discounts and tax.""" tracking_category_refs: Optional[list[shared_trackingcategoryref.TrackingCategoryRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategoryRefs'), 'exclude': lambda f: f is None }}) r"""Reference to the tracking categories to which the line item is linked.""" - unit_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'exclude': lambda f: f is None }}) + unit_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Price of each unit.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/purchaseorders.py b/previous-versions/accounting/src/codataccounting/models/shared/purchaseorders.py index a6f334783..db9780da7 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/purchaseorders.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/purchaseorders.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class PurchaseOrders: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/pushoperationsummary.py b/previous-versions/accounting/src/codataccounting/models/shared/pushoperationsummary.py index f4e3f5bca..3d370935b 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/pushoperationsummary.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/pushoperationsummary.py @@ -15,7 +15,6 @@ @dataclasses.dataclass class PushOperationSummary: - r"""OK""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -24,20 +23,20 @@ class PushOperationSummary: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -47,22 +46,23 @@ class PushOperationSummary: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -73,7 +73,7 @@ class PushOperationSummary: error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/pushoption.py b/previous-versions/accounting/src/codataccounting/models/shared/pushoption.py index e1f0bddbd..259bd6d22 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/pushoption.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/pushoption.py @@ -15,7 +15,6 @@ @dataclasses.dataclass class PushOption: - r"""OK""" display_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('displayName') }}) required: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('required') }}) type: shared_pushoptiontype.PushOptionType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/reportline.py b/previous-versions/accounting/src/codataccounting/models/shared/reportline.py index 16ab48bfa..2d5daa18c 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/reportline.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/reportline.py @@ -4,6 +4,7 @@ import dataclasses from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -11,7 +12,7 @@ @dataclasses.dataclass class ReportLine: - value: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('value') }}) + value: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('value'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) r"""Numerical value of the line item.""" account_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountId'), 'exclude': lambda f: f is None }}) r"""Identifier for the account, unique for the company in the accounting platform.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/salesorder.py b/previous-versions/accounting/src/codataccounting/models/shared/salesorder.py index 32e42dffa..0b00fd9bc 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/salesorder.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/salesorder.py @@ -2,14 +2,15 @@ from __future__ import annotations import dataclasses +from ..shared import accountingcustomerref as shared_accountingcustomerref from ..shared import addressesitems as shared_addressesitems -from ..shared import customerref as shared_customerref from ..shared import metadata as shared_metadata from ..shared import salesorderinvoicestatus as shared_salesorderinvoicestatus from ..shared import salesorderlineitem as shared_salesorderlineitem from ..shared import salesorderstatus as shared_salesorderstatus from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -45,43 +46,43 @@ class SalesOrderShipTo: @dataclasses.dataclass class SalesOrder: r"""> View the coverage for sales orders in the Data coverage explorer. - + ## Overview - + A sales order represents a customer's intention to purchase goods or services from a seller and usually includes information such as the expected delivery date and shipping details. This information can be used to provide visibility on a business's expected receivables and to track sales through the full procurement process. - + A sales order is typically converted to an [invoice](https://docs.codat.io/accounting-api#/schemas/Invoice) after approval. """ 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. """ - currency_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'exclude': lambda f: f is None }}) + currency_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currencyRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. - + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. - + 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 | @@ -90,23 +91,23 @@ class SalesOrder: """ customer_purchase_order_number: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerPurchaseOrderNumber'), 'exclude': lambda f: f is None }}) r"""A customer-supplied identifier for the purchase order in the customer's system.""" - customer_ref: Optional[shared_customerref.CustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) + customer_ref: Optional[shared_accountingcustomerref.AccountingCustomerRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('customerRef'), 'exclude': lambda f: f is None }}) expected_delivery_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('expectedDeliveryDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -118,20 +119,20 @@ class SalesOrder: r"""If the sales order is converted to an invoice, or will be in future, the invoicingStatus field indicates the current stage of the invoicing process.""" issue_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('issueDate'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 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. @@ -150,13 +151,13 @@ class SalesOrder: source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) status: Optional[shared_salesorderstatus.SalesOrderStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) r"""Current state of the sales order.""" - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the sales order, including discounts but excluding tax.""" - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the sales order, including discounts and tax.""" - total_discount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'exclude': lambda f: f is None }}) + total_discount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalDiscount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total value of any discounts applied to the sales order.""" - total_tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount'), 'exclude': lambda f: f is None }}) + total_tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of tax included in the sales order.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/salesorderlineitem.py b/previous-versions/accounting/src/codataccounting/models/shared/salesorderlineitem.py index 7440e3690..c90ebb46d 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/salesorderlineitem.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/salesorderlineitem.py @@ -8,6 +8,7 @@ from ..shared import taxrateref as shared_taxrateref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -28,22 +29,22 @@ class SalesOrderLineItem: r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is None }}) r"""Description of the goods or services that have been ordered.""" - discount_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'exclude': lambda f: f is None }}) + discount_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Value of any discounts applied.""" - discount_percentage: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'exclude': lambda f: f is None }}) + discount_percentage: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discountPercentage'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Percentage rate (from 0 to 100) of any discounts applied to the unit amount.""" item_ref: Optional[shared_itemref.ItemRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('itemRef'), 'exclude': lambda f: f is None }}) - quantity: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'exclude': lambda f: f is None }}) + quantity: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Number of units that have been ordered.""" - sub_total: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'exclude': lambda f: f is None }}) + sub_total: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subTotal'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of the line, inclusive of discounts but exclusive of tax.""" - tax_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'exclude': lambda f: f is None }}) + tax_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Amount of tax for the line.""" tax_rate_ref: Optional[shared_taxrateref.TaxRateRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('taxRateRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -51,10 +52,10 @@ class SalesOrderLineItem: - Invoice line items - Items """ - total_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'exclude': lambda f: f is None }}) + total_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total amount of the line, inclusive of discounts and tax.""" tracking: Optional[SalesOrderLineItemTracking] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tracking'), 'exclude': lambda f: f is None }}) - unit_amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'exclude': lambda f: f is None }}) + unit_amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('unitAmount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Price of each unit.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/salesorders.py b/previous-versions/accounting/src/codataccounting/models/shared/salesorders.py index 01b420216..f1852902b 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/salesorders.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/salesorders.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class SalesOrders: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/supplementaldata.py b/previous-versions/accounting/src/codataccounting/models/shared/supplementaldata.py index 2672e5029..8c6700643 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/supplementaldata.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/supplementaldata.py @@ -12,8 +12,8 @@ @dataclasses.dataclass class SupplementalData: r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ content: Optional[dict[str, dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/supplier.py b/previous-versions/accounting/src/codataccounting/models/shared/supplier.py index 70bdf5d87..310ba31ef 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/supplier.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/supplier.py @@ -16,9 +16,9 @@ @dataclasses.dataclass class Supplier: 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/accounting-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/accounting-api#/schemas/Bill). """ status: shared_supplierstatus.SupplierStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) @@ -42,8 +42,8 @@ class Supplier: source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ supplier_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplierName'), 'exclude': lambda f: f is None }}) r"""Name of the supplier as recorded in the accounting system, typically the company name.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/suppliers.py b/previous-versions/accounting/src/codataccounting/models/shared/suppliers.py index 6a8fa126d..239e9facf 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/suppliers.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/suppliers.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Suppliers: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/taxrate.py b/previous-versions/accounting/src/codataccounting/models/shared/taxrate.py index b815db902..c25dcac1a 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/taxrate.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/taxrate.py @@ -8,6 +8,7 @@ from ..shared import validdatatypelinks as shared_validdatatypelinks from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -16,18 +17,18 @@ @dataclasses.dataclass class TaxRate: r"""> View the coverage for tax rates in the Data coverage explorer. - + ## Overview - + Accounting systems typically store a set of taxes and associated rates within the accounting package. This means that users don't have to look up or remember the rates for each type of tax. For example, applying the tax \"UK sales VAT\" to line items of an invoice adds the correct rate of 20%. - + ### Tax components - + In some cases, a tax is made up of multiple sub taxes, often called _components_ of the tax. For example, you may have an item that is charged a tax rate called \"City import tax (8%)\" that has two components: - + - A city tax of 5% - An import tax of 3% - + > **Effective tax rates** > - Where there are multiple components of a tax, each component may be calculated on the original amount and added together. Alternatively, one tax may be calculated on the sub-total of the original amount plus another tax, which is referred to as _compounding_. When there is compounding, the effective tax rate is the rate that, if applied to the original amount, would result in the total amount of tax with compounding. > @@ -39,7 +40,7 @@ class TaxRate: code: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('code'), 'exclude': lambda f: f is None }}) r"""Code for the tax rate from the accounting platform.""" components: Optional[list[shared_taxratecomponent.TaxRateComponent]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('components'), 'exclude': lambda f: f is None }}) - effective_tax_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveTaxRate'), 'exclude': lambda f: f is None }}) + effective_tax_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveTaxRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""See Effective tax rates description.""" id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""Identifier for the tax rate, unique for the company in the accounting platform.""" @@ -54,7 +55,7 @@ class TaxRate: - `Archived` - A tax rate that has been archived or is inactive in the accounting platform. - `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform. """ - total_tax_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxRate'), 'exclude': lambda f: f is None }}) + total_tax_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('totalTaxRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Total (not compounded) sum of the components of a tax rate.""" valid_datatype_links: Optional[list[shared_validdatatypelinks.ValidDataTypeLinks]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validDatatypeLinks'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/taxratecomponent.py b/previous-versions/accounting/src/codataccounting/models/shared/taxratecomponent.py index 7ae0c03d7..d1b928e61 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/taxratecomponent.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/taxratecomponent.py @@ -4,6 +4,7 @@ import dataclasses from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -16,7 +17,7 @@ class TaxRateComponent: r"""A flag to indicate with the tax is calculated using the principle of compounding.""" name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) r"""Name of the tax rate component.""" - rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rate'), 'exclude': lambda f: f is None }}) + rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""The rate of the tax rate component, usually a percentage.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/taxrateref.py b/previous-versions/accounting/src/codataccounting/models/shared/taxrateref.py index 65e376f8f..b069c3b45 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/taxrateref.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/taxrateref.py @@ -4,6 +4,7 @@ import dataclasses from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -12,9 +13,9 @@ @dataclasses.dataclass class TaxRateRef: r"""Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. - + Found on: - + - Bill line items - Bill Credit Note line items - Credit Note line items @@ -22,7 +23,7 @@ class TaxRateRef: - Invoice line items - Items """ - effective_tax_rate: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveTaxRate'), 'exclude': lambda f: f is None }}) + effective_tax_rate: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effectiveTaxRate'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""Applicable tax rate.""" id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""Unique identifier for the tax rate in the accounting platform.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/taxrates.py b/previous-versions/accounting/src/codataccounting/models/shared/taxrates.py index 494a43669..d503c9d04 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/taxrates.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/taxrates.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class TaxRates: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/tracking.py b/previous-versions/accounting/src/codataccounting/models/shared/tracking.py index 0ae85b2de..d0595396c 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/tracking.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/tracking.py @@ -12,17 +12,12 @@ @dataclasses.dataclass class TrackingRecordReference: - r"""Links to the underlying record or data type. - - Found on: - - - Journal entries - - Account transactions - - Invoices - - Transfers + r"""Links the current record to the underlying record or data type that created it. + + For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. """ data_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) - r"""Name of the 'dataType'.""" + r"""Allowed name of the 'dataType'.""" id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) r"""'id' of the underlying record or data type.""" @@ -35,14 +30,9 @@ class TrackingRecordReference: class Tracking: record_refs: list[shared_invoiceto.InvoiceTo] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('recordRefs') }}) invoice_to: Optional[TrackingRecordReference] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('invoiceTo'), 'exclude': lambda f: f is None }}) - r"""Links to the underlying record or data type. - - Found on: - - - Journal entries - - Account transactions - - Invoices - - Transfers + r"""Links the current record to the underlying record or data type that created it. + + For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/trackingcategories.py b/previous-versions/accounting/src/codataccounting/models/shared/trackingcategories.py index 34840dd80..9373ea7f4 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/trackingcategories.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/trackingcategories.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class TrackingCategories: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/trackingcategory.py b/previous-versions/accounting/src/codataccounting/models/shared/trackingcategory.py index 904640556..677f948c8 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/trackingcategory.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/trackingcategory.py @@ -13,30 +13,132 @@ @dataclasses.dataclass class TrackingCategory: r"""Details of a category used for tracking transactions. - + > Language tip > > Parameters used to track types of spend in various parts of an organization can be called **dimensions**, **projects**, **classes**, or **locations** in different accounting platforms. In Codat, we refer to these as tracking categories. - + View the coverage for tracking categories in the Data coverage explorer. - + ## Overview - + Tracking categories are used to monitor cost centres and control budgets that sit outside the standard chart of accounts. Customers may use tracking categories to group together and track the income and costs of specific departments, projects, locations or customers. - + From their accounting system, customers can: - + - Create and maintain tracking categories and tracking category types. - View all tracking categories that are available for use. - View the relationships between the categories. - Assign invoices, bills, credit notes, or bill credit notes to one or more categories. - View the categories that a transaction belongs to. - View all transactions in a tracking category. - + + ### Tracking categories per platform + + Review the platform-specific tracking categories that Codat supports, and the level they are assigned to in the source platform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformTracking categoryTracking level
Dynamics 365DimensionsLine item
FreshbooksExpense categoriesLine item
MYOBCategoriesTransaction
NetsuiteClassesLine item
LocationsLine item
DepartmentsLine item
Custom segmentsLine item
QuickBooks DesktopClassesLine item or transaction level
LocationsTransaction
QuickBooks OnlineClassesLine item or transaction level
LocationsTransaction
Sage 200Cost centersLine item
DepartmentsLine item
Analysis codesTransaction
Sage 50DepartmentsLine item
CostcodesLine item
ProjectsLine item
Sage IntacctDimensionsLine item
XeroTracking categoriesLine item
+ > **Example use case** > > Monitor the budget for your annual conference using a tracking category called 'AnnualConference2020' with the **type** set to **Costing**. - + If a tracking category has a parent category, the ID of that parent category is displayed. There is also a `hasChildren` field that shows whether there are child subcategories nested beneath. """ has_children: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasChildren'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/trackingcategoryref.py b/previous-versions/accounting/src/codataccounting/models/shared/trackingcategoryref.py index f779744e9..240176ace 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/trackingcategoryref.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/trackingcategoryref.py @@ -12,8 +12,8 @@ @dataclasses.dataclass class TrackingCategoryRef: r"""References a category against which the item is tracked. - - Deprecated: this class will be removed in a future release, please migrate away from it as soon as possible + + Deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. """ id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/transfer.py b/previous-versions/accounting/src/codataccounting/models/shared/transfer.py index 77b1967f2..dacb1055e 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/transfer.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/transfer.py @@ -28,27 +28,27 @@ class TransferContactRef: @dataclasses.dataclass class Transfer: r"""> View the coverage for transfers in the Data coverage explorer. - + A transfer records the movement of money between two bank accounts, or between a bank account and a nominal account. It is a child data type of [account transactions](https://docs.codat.io/accounting-api#/schemas/AccountTransaction). """ contact_ref: Optional[TransferContactRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contactRef'), 'exclude': lambda f: f is None }}) r"""The customer or supplier for the transfer, if available.""" date_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('date'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -66,8 +66,8 @@ class Transfer: source_modified_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sourceModifiedDate'), 'exclude': lambda f: f is None }}) supplemental_data: Optional[shared_supplementaldata.SupplementalData] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('supplementalData'), 'exclude': lambda f: f is None }}) r"""Supplemental data is additional data you can include in our standard data types. - - It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/additional-data) about supplemental data. + + It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. """ to: Optional[shared_transferaccount.TransferAccount] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('to'), 'exclude': lambda f: f is None }}) tracking_category_refs: Optional[list[shared_trackingcategoryref.TrackingCategoryRef]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trackingCategoryRefs'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/transferaccount.py b/previous-versions/accounting/src/codataccounting/models/shared/transferaccount.py index f16266de8..406df2709 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/transferaccount.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/transferaccount.py @@ -5,6 +5,7 @@ from ..shared import accountref as shared_accountref from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal from typing import Optional @@ -14,15 +15,15 @@ class TransferAccount: account_ref: Optional[shared_accountref.AccountRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('accountRef'), 'exclude': lambda f: f is None }}) r"""Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.""" - amount: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) + amount: Optional[Decimal] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(True, False), 'decoder': utils.decimaldecoder, 'exclude': lambda f: f is None }}) r"""The amount transferred between accounts.""" 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. """ diff --git a/previous-versions/accounting/src/codataccounting/models/shared/transfers.py b/previous-versions/accounting/src/codataccounting/models/shared/transfers.py index 38a0dbf89..47c02a1aa 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/transfers.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/transfers.py @@ -13,7 +13,6 @@ @dataclasses.dataclass class Transfers: - r"""Success""" links: shared_links.Links = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('_links') }}) page_number: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageNumber') }}) page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/updatebankaccountresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/updatebankaccountresponse.py index c86cc87cc..008da51ac 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/updatebankaccountresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/updatebankaccountresponse.py @@ -2,21 +2,19 @@ from __future__ import annotations import dataclasses -from ..shared import bankaccount as shared_bankaccount 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 codataccounting import utils from dataclasses_json import Undefined, dataclass_json -from typing import Optional +from typing import Any, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class UpdateBankAccountResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +23,20 @@ class UpdateBankAccountResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -47,52 +45,38 @@ class UpdateBankAccountResponse: status: shared_pushoperationstatus.PushOperationStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }}) r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) + dollar_ref: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('$ref'), 'exclude': lambda f: f is None }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. """ - data: Optional[shared_bankaccount.BankAccount] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) - r"""> **Accessing Bank Accounts through Banking API** - > - > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. - > - > To view bank account data through the Banking API, please refer to the new datatype [here](https://docs.codat.io/banking-api#/schemas/Account) - - > View the coverage for bank accounts in the Data coverage explorer. - - ## Overview - - A list of bank accounts associated with a company and a specific data connection. - - Bank accounts data includes: - * The name and ID of the account in the accounting platform. - * The currency and balance of the account. - * The sort code and account number. - """ + data: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/updatebillcreditnoteresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/updatebillcreditnoteresponse.py index fe1f8edb9..8bd95fc56 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/updatebillcreditnoteresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/updatebillcreditnoteresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class UpdateBillCreditNoteResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class UpdateBillCreditNoteResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class UpdateBillCreditNoteResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -73,15 +73,15 @@ class UpdateBillCreditNoteResponse: r"""> **Bill credit notes or credit notes?** > > In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/accounting-api#/schemas/CreditNote). - + View the coverage for bill credit notes in the Data coverage explorer. - + ## Overview - + A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. - + In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier). - + A bill credit note includes details of: * The original and remaining credit. * Any allocations of the credit against other records, such as [bills](https://docs.codat.io/accounting-api#/schemas/Bill). @@ -90,9 +90,10 @@ class UpdateBillCreditNoteResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/updatebillresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/updatebillresponse.py index 2e2a529c5..57ed0ab31 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/updatebillresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/updatebillresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class UpdateBillResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class UpdateBillResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class UpdateBillResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -75,27 +75,28 @@ class UpdateBillResponse: > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. > > See [Invoices](https://docs.codat.io/accounting-api#/schemas/Invoice) for the accounts receivable equivalent of bills. - + View the coverage for bills in the Data coverage explorer. - + ## Overview - + In Codat, a bill contains details of: * When the bill was recorded in the accounting system. * How much the bill is for and the currency of the amount. * Who the bill was received from — the *supplier*. * What the bill is for — the *line items*. - + Some accounting platforms give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. - + You can find these types of transactions in our [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) data model. """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/updatecreditnoteresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/updatecreditnoteresponse.py index d8e6a7c2d..bb30b90db 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/updatecreditnoteresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/updatecreditnoteresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class UpdateCreditNoteResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class UpdateCreditNoteResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class UpdateCreditNoteResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,13 +71,13 @@ class UpdateCreditNoteResponse: """ data: Optional[shared_creditnote.CreditNote] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> View the coverage for credit notes in the Data coverage explorer. - + ## Overview - + Think of a credit note as a voucher issued to a customer. It is a reduction that can be applied against one or multiple invoices. A credit note can either reduce the amount owed or cancel out an invoice entirely. - + In the Codat system a credit note is issued to a [customer's](https://docs.codat.io/accounting-api#/schemas/Customer) accounts receivable. - + It contains details of: * The amount of credit remaining and its status. * Payment allocations against the payments type, in this case an invoice. @@ -86,9 +86,10 @@ class UpdateCreditNoteResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/updatecustomerresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/updatecustomerresponse.py index fde1b9c7b..a247a5f33 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/updatecustomerresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/updatecustomerresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class UpdateCustomerResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class UpdateCustomerResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class UpdateCustomerResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,19 +71,20 @@ class UpdateCustomerResponse: """ data: Optional[shared_customer.Customer] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> 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/accounting-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 }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/updateinvoiceresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/updateinvoiceresponse.py index 9945bf90a..996a8b122 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/updateinvoiceresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/updateinvoiceresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class UpdateInvoiceResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class UpdateInvoiceResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class UpdateInvoiceResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -75,27 +75,27 @@ class UpdateInvoiceResponse: > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company issued an invoice, and is owed money (accounts receivable) we call this an Invoice. > > See [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) for the accounts payable equivalent of bills. - + View the coverage for invoices in the Data coverage explorer. - + ## Overview - + An invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/accounting-api#/schemas/Customer). - + In Codat, an invoice contains details of: - + - The timeline of the invoice—when it was raised, marked as paid, last edited, and so on. - How much the invoice is for, what portion of the invoice is tax or discounts, and what currency the amounts are represented in. - Who the invoice has been raised to; the _customer_. - The breakdown of what the invoice is for; the _line items_. - Any [payments](https://docs.codat.io/accounting-api#/schemas/Payment) assigned to the invoice; the _payment allocations_. - + > **Invoice PDF downloads** > > You can download a PDF version of an invoice for supported integrations. > > The filename will be invoice-{number}.pdf. - + > **Referencing an invoice in Sage 50 and ClearBooks** > > In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same. @@ -103,9 +103,10 @@ class UpdateInvoiceResponse: data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/updatepurchaseorderresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/updatepurchaseorderresponse.py index 77cb517f5..ab8225e74 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/updatepurchaseorderresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/updatepurchaseorderresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class UpdatePurchaseOrderResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class UpdatePurchaseOrderResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class UpdatePurchaseOrderResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,19 +71,20 @@ class UpdatePurchaseOrderResponse: """ data: Optional[shared_purchaseorder.PurchaseOrder] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) r"""> View the coverage for purchase orders in the Data coverage explorer. - + ## Overview - + Purchase orders represent a business's intent to purchase goods or services from a supplier and normally include information such as expected delivery dates and shipping details. - + This information can be used to provide visibility on a business's expected payables and to track a purchase through the full procurement process. """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/updatesupplierresponse.py b/previous-versions/accounting/src/codataccounting/models/shared/updatesupplierresponse.py index 360050206..0166600df 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/updatesupplierresponse.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/updatesupplierresponse.py @@ -16,7 +16,6 @@ @dataclasses.dataclass class UpdateSupplierResponse: - r"""Success""" company_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('companyId') }}) r"""Unique identifier for your SMB in Codat.""" data_connection_key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataConnectionKey') }}) @@ -25,20 +24,20 @@ class UpdateSupplierResponse: r"""A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.""" requested_on_utc: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requestedOnUtc') }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -48,22 +47,23 @@ class UpdateSupplierResponse: r"""The status of the push operation.""" status_code: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('statusCode') }}) changes: Optional[list[shared_pushoperationchange.PushOperationChange]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('changes'), 'exclude': lambda f: f is None }}) + r"""Contains a single entry that communicates which record has changed and the manner in which it changed.""" completed_on_utc: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedOnUtc'), 'exclude': lambda f: f is None }}) r"""In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - + ``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ``` - - - + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00` - + > Time zones > > Not all dates from Codat will contain information about time zones. @@ -71,17 +71,18 @@ class UpdateSupplierResponse: """ data: Optional[shared_supplier.Supplier] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) 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/accounting-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/accounting-api#/schemas/Bill). """ data_type: Optional[shared_datatype.DataType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dataType'), 'exclude': lambda f: f is None }}) r"""Available Data types""" error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('errorMessage'), 'exclude': lambda f: f is None }}) + r"""The request made is not valid.""" timeout_in_minutes: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInMinutes'), 'exclude': lambda f: f is None }}) timeout_in_seconds: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timeoutInSeconds'), 'exclude': lambda f: f is None }}) - r"""Deprecated: this field will be removed in a future release, please migrate away from it as soon as possible""" + r"""Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.""" validation: Optional[shared_validation.Validation] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation'), 'exclude': lambda f: f is None }}) r"""A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here.""" diff --git a/previous-versions/accounting/src/codataccounting/models/shared/validdatatypelinks.py b/previous-versions/accounting/src/codataccounting/models/shared/validdatatypelinks.py index 37aadfd48..69cc5bb1d 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/validdatatypelinks.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/validdatatypelinks.py @@ -12,18 +12,18 @@ @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\", @@ -43,13 +43,13 @@ class ValidDataTypeLinks: ] } ``` - - - + + + ## Support for `validDatatypeLinks` - + Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. - + If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. """ links: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('links'), 'exclude': lambda f: f is None }}) diff --git a/previous-versions/accounting/src/codataccounting/models/shared/withholdingtaxitems.py b/previous-versions/accounting/src/codataccounting/models/shared/withholdingtaxitems.py index cafb8acb7..de792a938 100755 --- a/previous-versions/accounting/src/codataccounting/models/shared/withholdingtaxitems.py +++ b/previous-versions/accounting/src/codataccounting/models/shared/withholdingtaxitems.py @@ -4,13 +4,14 @@ import dataclasses from codataccounting import utils from dataclasses_json import Undefined, dataclass_json +from decimal import Decimal @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class WithholdingTaxitems: - amount: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }}) + amount: Decimal = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'encoder': utils.decimalencoder(False, False), 'decoder': utils.decimaldecoder }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) diff --git a/previous-versions/accounting/src/codataccounting/payment_methods.py b/previous-versions/accounting/src/codataccounting/payment_methods.py index c2f1edfb3..d654b5d6a 100755 --- a/previous-versions/accounting/src/codataccounting/payment_methods.py +++ b/previous-versions/accounting/src/codataccounting/payment_methods.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class PaymentMethods: @@ -16,25 +16,29 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def get(self, request: operations.GetPaymentMethodRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPaymentMethodResponse: r"""Get payment method The *Get payment method* endpoint returns a single payment method for a given paymentMethodId. - + [Payment methods](https://docs.codat.io/accounting-api#/schemas/PaymentMethod) are used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/accounting-api#/schemas/Payment). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=paymentMethods) for integrations that support getting a specific payment method. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetPaymentMethodRequest, base_url, '/companies/{companyId}/data/paymentMethods/{paymentMethodId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -52,14 +56,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PaymentMethod]) res.payment_method = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetPaymentMethod409ApplicationJSON]) - res.get_payment_method_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -67,9 +71,9 @@ def do_request(): def list(self, request: operations.ListPaymentMethodsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPaymentMethodsResponse: r"""List payment methods The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/accounting-api#/schemas/PaymentMethod) for a given company's connection. - + [Payment methods](https://docs.codat.io/accounting-api#/schemas/PaymentMethod) are used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/accounting-api#/schemas/Payment). - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -77,14 +81,18 @@ def list(self, request: operations.ListPaymentMethodsRequest, retries: Optional[ url = utils.generate_url(operations.ListPaymentMethodsRequest, base_url, '/companies/{companyId}/data/paymentMethods', request) headers = {} query_params = utils.get_query_params(operations.ListPaymentMethodsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -102,14 +110,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PaymentMethods]) res.payment_methods = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListPaymentMethods409ApplicationJSON]) - res.list_payment_methods_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/payments.py b/previous-versions/accounting/src/codataccounting/payments.py index fcbd7c41d..f6144ea2d 100755 --- a/previous-versions/accounting/src/codataccounting/payments.py +++ b/previous-versions/accounting/src/codataccounting/payments.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class Payments: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreatePaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreatePaymentResponse: r"""Create payment The *Create payment* endpoint creates a new [payment](https://docs.codat.io/accounting-api#/schemas/Payment) for a given company's connection. - + [Payments](https://docs.codat.io/accounting-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create payment model](https://docs.codat.io/accounting-api#/operations/get-create-payments-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreatePaymentRequest, retries: Optional[uti if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreatePaymentRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreatePaymentResponse]) res.create_payment_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,25 +77,29 @@ def do_request(): def get(self, request: operations.GetPaymentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPaymentResponse: r"""Get payment The *Get payment* endpoint returns a single payment for a given paymentId. - + [Payments](https://docs.codat.io/accounting-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support getting a specific payment. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetPaymentRequest, base_url, '/companies/{companyId}/data/payments/{paymentId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -105,14 +117,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Payment]) res.payment = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetPayment409ApplicationJSON]) - res.get_payment_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -120,27 +132,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreatePaymentsModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreatePaymentsModelResponse: r"""Get create payment model The *Get create payment model* endpoint returns the expected data for the request payload when creating a [payment](https://docs.codat.io/accounting-api#/schemas/Payment) for a given company and integration. - + [Payments](https://docs.codat.io/accounting-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=payments) for integrations that support creating a payment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreatePaymentsModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/payments', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -158,10 +174,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -169,9 +189,9 @@ def do_request(): def list(self, request: operations.ListPaymentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPaymentsResponse: r"""List payments The *List payments* endpoint returns a list of [payments](https://docs.codat.io/accounting-api#/schemas/Payment) for a given company's connection. - + [Payments](https://docs.codat.io/accounting-api#/schemas/Payment) represent an allocation of money within any customer accounts receivable account. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -179,14 +199,18 @@ def list(self, request: operations.ListPaymentsRequest, retries: Optional[utils. url = utils.generate_url(operations.ListPaymentsRequest, base_url, '/companies/{companyId}/data/payments', request) headers = {} query_params = utils.get_query_params(operations.ListPaymentsRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -204,14 +228,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Payments]) res.payments = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListPayments409ApplicationJSON]) - res.list_payments_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/purchase_orders.py b/previous-versions/accounting/src/codataccounting/purchase_orders.py index 8397d04db..066d9aa57 100755 --- a/previous-versions/accounting/src/codataccounting/purchase_orders.py +++ b/previous-versions/accounting/src/codataccounting/purchase_orders.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class PurchaseOrders: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreatePurchaseOrderRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreatePurchaseOrderResponse: r"""Create purchase order The *Create purchase order* endpoint creates a new [purchase order](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) for a given company's connection. - + [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update purchase order model](https://docs.codat.io/accounting-api#/operations/get-create-update-purchaseOrders-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +33,18 @@ def create(self, request: operations.CreatePurchaseOrderRequest, retries: Option if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.CreatePurchaseOrderRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,10 +62,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreatePurchaseOrderResponse]) res.create_purchase_order_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -69,25 +77,29 @@ def do_request(): def get(self, request: operations.GetPurchaseOrderRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetPurchaseOrderResponse: r"""Get purchase order The *Get purchase order* endpoint returns a single purchase order for a given purchaseOrderId. - + [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support getting a specific purchase order. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetPurchaseOrderRequest, base_url, '/companies/{companyId}/data/purchaseOrders/{purchaseOrderId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -105,14 +117,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PurchaseOrder]) res.purchase_order = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetPurchaseOrder409ApplicationJSON]) - res.get_purchase_order_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -120,27 +132,31 @@ def do_request(): def get_create_update_model(self, request: operations.GetCreateUpdatePurchaseOrdersModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdatePurchaseOrdersModelResponse: r"""Get create/update purchase order model The *Get create/update purchase order model* endpoint returns the expected data for the request payload when creating and updating a [purchase order](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) for a given company and integration. - + [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating and updating a purchase order. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateUpdatePurchaseOrdersModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/purchaseOrders', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -158,10 +174,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -169,9 +189,9 @@ def do_request(): def list(self, request: operations.ListPurchaseOrdersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListPurchaseOrdersResponse: r"""List purchase orders The *List purchase orders* endpoint returns a list of [purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) for a given company's connection. - + [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -179,14 +199,18 @@ def list(self, request: operations.ListPurchaseOrdersRequest, retries: Optional[ url = utils.generate_url(operations.ListPurchaseOrdersRequest, base_url, '/companies/{companyId}/data/purchaseOrders', request) headers = {} query_params = utils.get_query_params(operations.ListPurchaseOrdersRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -204,14 +228,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PurchaseOrders]) res.purchase_orders = out - elif http_res.status_code in [400, 401, 404]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListPurchaseOrders409ApplicationJSON]) - res.list_purchase_orders_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -219,13 +243,13 @@ def do_request(): def update(self, request: operations.UpdatePurchaseOrderRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdatePurchaseOrderResponse: r"""Update purchase order The *Update purchase order* endpoint updates an existing [purchase order](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) for a given company's connection. - + [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update purchase order model](https://docs.codat.io/accounting-api#/operations/get-create-update-purchaseOrders-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -236,14 +260,18 @@ def update(self, request: operations.UpdatePurchaseOrderRequest, retries: Option if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type query_params = utils.get_query_params(operations.UpdatePurchaseOrderRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers) @@ -261,10 +289,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.UpdatePurchaseOrderResponse]) res.update_purchase_order_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/reports.py b/previous-versions/accounting/src/codataccounting/reports.py index b3257cc95..d02f09d3d 100755 --- a/previous-versions/accounting/src/codataccounting/reports.py +++ b/previous-versions/accounting/src/codataccounting/reports.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class Reports: @@ -22,14 +22,18 @@ def get_aged_creditors_report(self, request: operations.GetAgedCreditorsReportRe url = utils.generate_url(operations.GetAgedCreditorsReportRequest, base_url, '/companies/{companyId}/reports/agedCreditor', request) headers = {} query_params = utils.get_query_params(operations.GetAgedCreditorsReportRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -47,10 +51,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AgedCreditorReport]) res.aged_creditor_report = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -64,14 +72,18 @@ def get_aged_debtors_report(self, request: operations.GetAgedDebtorsReportReques url = utils.generate_url(operations.GetAgedDebtorsReportRequest, base_url, '/companies/{companyId}/reports/agedDebtor', request) headers = {} query_params = utils.get_query_params(operations.GetAgedDebtorsReportRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -89,10 +101,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AgedDebtorReport]) res.aged_debtor_report = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -106,14 +122,18 @@ def get_balance_sheet(self, request: operations.GetBalanceSheetRequest, retries: url = utils.generate_url(operations.GetBalanceSheetRequest, base_url, '/companies/{companyId}/data/financials/balanceSheet', request) headers = {} query_params = utils.get_query_params(operations.GetBalanceSheetRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -131,14 +151,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.BalanceSheet1]) res.balance_sheet = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetBalanceSheet409ApplicationJSON]) - res.get_balance_sheet_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -152,14 +172,18 @@ def get_cash_flow_statement(self, request: operations.GetCashFlowStatementReques url = utils.generate_url(operations.GetCashFlowStatementRequest, base_url, '/companies/{companyId}/data/financials/cashFlowStatement', request) headers = {} query_params = utils.get_query_params(operations.GetCashFlowStatementRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -177,14 +201,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CashFlowStatement1]) res.cash_flow_statement = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetCashFlowStatement409ApplicationJSON]) - res.get_cash_flow_statement_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -198,14 +222,18 @@ def get_profit_and_loss(self, request: operations.GetProfitAndLossRequest, retri url = utils.generate_url(operations.GetProfitAndLossRequest, base_url, '/companies/{companyId}/data/financials/profitAndLoss', request) headers = {} query_params = utils.get_query_params(operations.GetProfitAndLossRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -223,14 +251,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ProfitAndLossReport1]) res.profit_and_loss_report = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetProfitAndLoss409ApplicationJSON]) - res.get_profit_and_loss_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -248,9 +276,13 @@ def is_aged_creditors_report_available(self, request: operations.IsAgedCreditors client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -268,6 +300,8 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[bool]) res.is_aged_creditors_report_available_200_application_json_boolean = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -285,9 +319,13 @@ def is_aged_debtor_report_available(self, request: operations.IsAgedDebtorReport client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -305,6 +343,8 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[bool]) res.is_aged_debtor_report_available_200_application_json_boolean = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/sales_orders.py b/previous-versions/accounting/src/codataccounting/sales_orders.py index ef5c1f9a4..d922cf884 100755 --- a/previous-versions/accounting/src/codataccounting/sales_orders.py +++ b/previous-versions/accounting/src/codataccounting/sales_orders.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class SalesOrders: @@ -16,25 +16,29 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def get(self, request: operations.GetSalesOrderRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSalesOrderResponse: r"""Get sales order The *Get sales order* endpoint returns a single sales order for a given salesOrderId. - + [Sales orders](https://docs.codat.io/accounting-api#/schemas/SalesOrder) represent a customer's intention to purchase goods or services from the SMB. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=salesOrders) for integrations that support getting a specific sales order. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetSalesOrderRequest, base_url, '/companies/{companyId}/data/salesOrders/{salesOrderId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -52,14 +56,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.SalesOrder]) res.sales_order = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetSalesOrder409ApplicationJSON]) - res.get_sales_order_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -67,9 +71,9 @@ def do_request(): def list(self, request: operations.ListSalesOrdersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSalesOrdersResponse: r"""List sales orders The *List sales orders* endpoint returns a list of [sales orders](https://docs.codat.io/accounting-api#/schemas/SalesOrder) for a given company's connection. - + [Sales orders](https://docs.codat.io/accounting-api#/schemas/SalesOrder) represent a customer's intention to purchase goods or services from the SMB. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -77,14 +81,18 @@ def list(self, request: operations.ListSalesOrdersRequest, retries: Optional[uti url = utils.generate_url(operations.ListSalesOrdersRequest, base_url, '/companies/{companyId}/data/salesOrders', request) headers = {} query_params = utils.get_query_params(operations.ListSalesOrdersRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -102,14 +110,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.SalesOrders]) res.sales_orders = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListSalesOrders409ApplicationJSON]) - res.list_sales_orders_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/sdk.py b/previous-versions/accounting/src/codataccounting/sdk.py index 2a3099347..e0edc4b98 100755 --- a/previous-versions/accounting/src/codataccounting/sdk.py +++ b/previous-versions/accounting/src/codataccounting/sdk.py @@ -32,11 +32,11 @@ class CodatAccounting: r"""Accounting API: A flexible API for pulling accounting data, normalized and aggregated from 20 accounting integrations. - + Standardize how you connect to your customers’ accounting software. View, create, update, and delete data in the same way for all the leading accounting platforms. - + [Read more...](https://docs.codat.io/accounting-api/overview) - + [See our OpenAPI spec](https://github.com/codatio/oas) """ account_transactions: AccountTransactions @@ -97,7 +97,8 @@ def __init__(self, server_idx: int = None, server_url: str = None, url_params: dict[str, str] = None, - client: requests_http.Session = None + client: requests_http.Session = None, + retry_config: utils.RetryConfig = None ) -> None: """Instantiates the SDK configuring it with the provided parameters. @@ -110,7 +111,9 @@ def __init__(self, :param url_params: Parameters to optionally template the server URL with :type url_params: dict[str, str] :param client: The requests.Session HTTP client to use for all operations - :type client: requests_http.Session + :type client: requests_http.Session + :param retry_config: The utils.RetryConfig to use globally + :type retry_config: utils.RetryConfig """ if client is None: client = requests_http.Session() @@ -121,7 +124,7 @@ def __init__(self, if url_params is not None: server_url = utils.template_url(server_url, url_params) - self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server_idx) + self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server_idx, retry_config=retry_config) self._init_sdks() diff --git a/previous-versions/accounting/src/codataccounting/sdkconfiguration.py b/previous-versions/accounting/src/codataccounting/sdkconfiguration.py index 806a7adbc..12e976433 100755 --- a/previous-versions/accounting/src/codataccounting/sdkconfiguration.py +++ b/previous-versions/accounting/src/codataccounting/sdkconfiguration.py @@ -3,6 +3,8 @@ import requests from dataclasses import dataclass +from .utils.retries import RetryConfig + SERVERS = [ 'https://api.codat.io', @@ -17,9 +19,10 @@ class SDKConfiguration: server_url: str = '' server_idx: int = 0 language: str = 'python' - openapi_doc_version: str = '2.1.0' - sdk_version: str = '0.28.1' - gen_version: str = '2.58.0' + openapi_doc_version: str = '3.0.0' + sdk_version: str = '0.1.0' + gen_version: str = '2.108.3' + retry_config: RetryConfig = None def get_server_details(self) -> tuple[str, dict[str, str]]: if self.server_url: diff --git a/previous-versions/accounting/src/codataccounting/suppliers.py b/previous-versions/accounting/src/codataccounting/suppliers.py index 56d06e597..7b39c191c 100755 --- a/previous-versions/accounting/src/codataccounting/suppliers.py +++ b/previous-versions/accounting/src/codataccounting/suppliers.py @@ -2,9 +2,14 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared +from enum import Enum from typing import Optional +class DownloadAttachmentAcceptEnum(str, Enum): + APPLICATION_JSON = "application/json" + APPLICATION_OCTET_STREAM = "application/octet-stream" + class Suppliers: r"""Suppliers""" sdk_configuration: SDKConfiguration @@ -16,13 +21,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateSupplierResponse: r"""Create supplier The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection. - + [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -33,14 +38,18 @@ def create(self, request: operations.CreateSupplierRequest, retries: Optional[ut 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;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, params=query_params, data=data, files=form, headers=headers) @@ -58,34 +67,45 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateSupplierResponse]) res.create_supplier_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res - def download_attachment(self, request: operations.DownloadSupplierAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.DownloadSupplierAttachmentResponse: + def download_attachment(self, request: operations.DownloadSupplierAttachmentRequest, retries: Optional[utils.RetryConfig] = None, accept_header_override: Optional[DownloadAttachmentAcceptEnum] = None) -> operations.DownloadSupplierAttachmentResponse: r"""Download supplier attachment The *Download supplier attachment* endpoint downloads a specific attachment for a given `supplierId` and `attachmentId`. - + [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support downloading a supplier attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.DownloadSupplierAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}/download', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' + if accept_header_override is not None: + headers['Accept'] = accept_header_override.value + else: + headers['Accept'] = 'application/json;q=1, application/octet-stream;q=0' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -102,10 +122,14 @@ def do_request(): if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/octet-stream'): res.data = http_res.content + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -113,25 +137,29 @@ def do_request(): def get(self, request: operations.GetSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSupplierResponse: r"""Get supplier The *Get supplier* endpoint returns a single supplier for a given supplierId. - + [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support getting a specific supplier. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetSupplierRequest, base_url, '/companies/{companyId}/data/suppliers/{supplierId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -149,14 +177,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Supplier]) res.supplier = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetSupplier409ApplicationJSON]) - res.get_supplier_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -164,23 +192,27 @@ def do_request(): def get_attachment(self, request: operations.GetSupplierAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetSupplierAttachmentResponse: r"""Get supplier attachment The *Get supplier attachment* endpoint returns a specific attachment for a given `supplierId` and `attachmentId`. - + [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support getting a supplier attachment. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetSupplierAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -198,10 +230,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Attachment]) 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 [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -209,27 +245,31 @@ def do_request(): def get_create_update_model(self, request: operations.GetCreateUpdateSuppliersModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateUpdateSuppliersModelResponse: r"""Get create/update supplier model The *Get create/update supplier model* endpoint returns the expected data for the request payload when creating and updating a [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company and integration. - + [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating and updating a supplier. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateUpdateSuppliersModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/suppliers', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -247,10 +287,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -258,9 +302,9 @@ def do_request(): def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSuppliersResponse: r"""List suppliers The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection. - + [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -268,14 +312,18 @@ def list(self, request: operations.ListSuppliersRequest, retries: Optional[utils url = utils.generate_url(operations.ListSuppliersRequest, base_url, '/companies/{companyId}/data/suppliers', request) headers = {} query_params = utils.get_query_params(operations.ListSuppliersRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -293,14 +341,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Suppliers]) res.suppliers = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListSuppliers409ApplicationJSON]) - res.list_suppliers_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -308,23 +356,27 @@ def do_request(): def list_attachments(self, request: operations.ListSupplierAttachmentsRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListSupplierAttachmentsResponse: r"""List supplier attachments The *List supplier attachments* endpoint returns a list of attachments available to download for given `supplierId`. - + [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support listing supplier attachments. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.ListSupplierAttachmentsRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -342,10 +394,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.AttachmentsDataset]) res.attachments_dataset = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -353,13 +409,13 @@ def do_request(): def update(self, request: operations.UpdateSupplierRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UpdateSupplierResponse: r"""Update supplier The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection. - + [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -370,14 +426,18 @@ def update(self, request: operations.UpdateSupplierRequest, retries: Optional[ut 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;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('PUT', url, params=query_params, data=data, files=form, headers=headers) @@ -395,10 +455,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.UpdateSupplierResponse]) res.update_supplier_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/tax_rates.py b/previous-versions/accounting/src/codataccounting/tax_rates.py index c846685ad..e0fa31b6f 100755 --- a/previous-versions/accounting/src/codataccounting/tax_rates.py +++ b/previous-versions/accounting/src/codataccounting/tax_rates.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class TaxRates: @@ -16,25 +16,29 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def get(self, request: operations.GetTaxRateRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetTaxRateResponse: r"""Get tax rate The *Get tax rate* endpoint returns a single tax rate for a given taxRateId. - + [Tax rates](https://docs.codat.io/accounting-api#/schemas/TaxRate) are a set of taxes and associated rates within the SMB's accounting package. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=taxRates) for integrations that support getting a specific tax rate. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetTaxRateRequest, base_url, '/companies/{companyId}/data/taxRates/{taxRateId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -52,14 +56,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.TaxRate]) res.tax_rate = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetTaxRate409ApplicationJSON]) - res.get_tax_rate_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -67,9 +71,9 @@ def do_request(): def list(self, request: operations.ListTaxRatesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListTaxRatesResponse: r"""List all tax rates The *List tax rates* endpoint returns a list of [tax rates](https://docs.codat.io/accounting-api#/schemas/TaxRate) for a given company's connection. - + [Tax rates](https://docs.codat.io/accounting-api#/schemas/TaxRate) are a set of taxes and associated rates within the SMB's accounting package. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -77,14 +81,18 @@ def list(self, request: operations.ListTaxRatesRequest, retries: Optional[utils. url = utils.generate_url(operations.ListTaxRatesRequest, base_url, '/companies/{companyId}/data/taxRates', request) headers = {} query_params = utils.get_query_params(operations.ListTaxRatesRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -102,14 +110,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.TaxRates]) res.tax_rates = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListTaxRates409ApplicationJSON]) - res.list_tax_rates_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/tracking_categories.py b/previous-versions/accounting/src/codataccounting/tracking_categories.py index 7ae0ebcde..b81865679 100755 --- a/previous-versions/accounting/src/codataccounting/tracking_categories.py +++ b/previous-versions/accounting/src/codataccounting/tracking_categories.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class TrackingCategories: @@ -16,25 +16,29 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def get(self, request: operations.GetTrackingCategoryRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetTrackingCategoryResponse: r"""Get tracking categories The *Get tracking category* endpoint returns a single tracking category for a given trackingCategoryId. - + [Tracking categories](https://docs.codat.io/accounting-api#/schemas/TrackingCategory) are used to monitor cost centres and control budgets that sit outside the standard set of accounts. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=trackingCategories) for integrations that support getting a specific tracking category. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetTrackingCategoryRequest, base_url, '/companies/{companyId}/data/trackingCategories/{trackingCategoryId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -52,14 +56,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.TrackingCategoryTree]) res.tracking_category_tree = out - elif http_res.status_code in [401, 404, 429]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetTrackingCategory409ApplicationJSON]) - res.get_tracking_category_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -67,9 +71,9 @@ def do_request(): def list(self, request: operations.ListTrackingCategoriesRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListTrackingCategoriesResponse: r"""List tracking categories The *List tracking categories* endpoint returns a list of [tracking categories](https://docs.codat.io/accounting-api#/schemas/TrackingCategory) for a given company's connection. - + [Tracking categories](https://docs.codat.io/accounting-api#/schemas/TrackingCategory) are used to monitor cost centres and control budgets that sit outside the standard set of accounts. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -77,14 +81,18 @@ def list(self, request: operations.ListTrackingCategoriesRequest, retries: Optio url = utils.generate_url(operations.ListTrackingCategoriesRequest, base_url, '/companies/{companyId}/data/trackingCategories', request) headers = {} query_params = utils.get_query_params(operations.ListTrackingCategoriesRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -102,14 +110,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.TrackingCategories]) res.tracking_categories = out - elif http_res.status_code in [400, 401, 404]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListTrackingCategories409ApplicationJSON]) - res.list_tracking_categories_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/transfers.py b/previous-versions/accounting/src/codataccounting/transfers.py index aa548b232..b14e5d8e0 100755 --- a/previous-versions/accounting/src/codataccounting/transfers.py +++ b/previous-versions/accounting/src/codataccounting/transfers.py @@ -2,7 +2,7 @@ from .sdkconfiguration import SDKConfiguration from codataccounting import utils -from codataccounting.models import operations, shared +from codataccounting.models import errors, operations, shared from typing import Optional class Transfers: @@ -16,13 +16,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def create(self, request: operations.CreateTransferRequest, retries: Optional[utils.RetryConfig] = None) -> operations.CreateTransferResponse: r"""Create transfer The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/accounting-api#/schemas/Transfer) for a given company's connection. - + [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - + **Integration-specific behaviour** - + Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/accounting-api#/operations/get-create-transfers-model). - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating an account. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -32,14 +32,18 @@ def create(self, request: operations.CreateTransferRequest, retries: Optional[ut req_content_type, data, form = utils.serialize_request_body(request, "transfer", 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('POST', url, data=data, files=form, headers=headers) @@ -57,10 +61,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.CreateTransferResponse]) res.create_transfer_response = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -68,25 +76,29 @@ def do_request(): def get(self, request: operations.GetTransferRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetTransferResponse: r"""Get transfer The *Get transfer* endpoint returns a single transfer for a given transferId. - + [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support getting a specific transfer. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetTransferRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/transfers/{transferId}', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -104,14 +116,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Transfer]) res.transfer = out - elif http_res.status_code in [401, 404, 429]: - if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [401, 404, 409, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.GetTransfer409ApplicationJSON]) - res.get_transfer_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -119,27 +131,31 @@ def do_request(): def get_create_model(self, request: operations.GetCreateTransfersModelRequest, retries: Optional[utils.RetryConfig] = None) -> operations.GetCreateTransfersModelResponse: r"""Get create transfer model The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/accounting-api#/schemas/Transfer) for a given company and integration. - + [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - + **Integration-specific behaviour** - + See the *response examples* for integration-specific indicative models. - + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating a transfer. """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetCreateTransfersModelRequest, base_url, '/companies/{companyId}/connections/{connectionId}/options/transfers', request) headers = {} - headers['Accept'] = 'application/json;q=1, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, headers=headers) @@ -157,10 +173,14 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.PushOption]) 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]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res @@ -168,9 +188,9 @@ def do_request(): def list(self, request: operations.ListTransfersRequest, retries: Optional[utils.RetryConfig] = None) -> operations.ListTransfersResponse: r"""List transfers The *List transfers* endpoint returns a list of [transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) for a given company's connection. - + [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account. - + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). """ base_url = utils.template_url(*self.sdk_configuration.get_server_details()) @@ -178,14 +198,18 @@ def list(self, request: operations.ListTransfersRequest, retries: Optional[utils url = utils.generate_url(operations.ListTransfersRequest, base_url, '/companies/{companyId}/connections/{connectionId}/data/transfers', request) headers = {} query_params = utils.get_query_params(operations.ListTransfersRequest, request) - headers['Accept'] = 'application/json;q=1, application/json;q=0.7, application/json;q=0' + headers['Accept'] = 'application/json' headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' client = self.sdk_configuration.security_client + global_retry_config = self.sdk_configuration.retry_config retry_config = retries if retry_config is None: - retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) def do_request(): return client.request('GET', url, params=query_params, headers=headers) @@ -203,14 +227,70 @@ def do_request(): if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Transfers]) res.transfers = out - elif http_res.status_code in [400, 401, 404]: + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + elif http_res.status_code in [400, 401, 404, 409]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[shared.Schema]) - res.schema = out - elif http_res.status_code == 409: + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) + + return res + + + def upload_attachment(self, request: operations.UploadTransferAttachmentRequest, retries: Optional[utils.RetryConfig] = None) -> operations.UploadTransferAttachmentResponse: + r"""Push invoice attachment + The *Upload transfer attachment* endpoint uploads an attachment and assigns it against a specific `transferId`. + + [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) are issued by a supplier for the purpose of recording transfer. + + **Integration-specific behaviour** + + For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). + + Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support uploading a transfer attachment. + """ + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) + + url = utils.generate_url(operations.UploadTransferAttachmentRequest, base_url, '/companies/{companyId}/connections/{connectionId}/push/transfers/{transferId}/attachment', request) + headers = {} + req_content_type, data, form = utils.serialize_request_body(request, "request_body", 'multipart') + if req_content_type not in ('multipart/form-data', 'multipart/mixed'): + headers['content-type'] = req_content_type + headers['Accept'] = 'application/json' + headers['user-agent'] = f'speakeasy-sdk/{self.sdk_configuration.language} {self.sdk_configuration.sdk_version} {self.sdk_configuration.gen_version} {self.sdk_configuration.openapi_doc_version}' + + client = self.sdk_configuration.security_client + + global_retry_config = self.sdk_configuration.retry_config + retry_config = retries + if retry_config is None: + if global_retry_config: + retry_config = global_retry_config + else: + retry_config = utils.RetryConfig('backoff', utils.BackoffStrategy(500, 60000, 1.5, 3600000), True) + + def do_request(): + return client.request('POST', url, data=data, files=form, headers=headers) + + http_res = utils.retry(do_request, utils.Retries(retry_config, [ + '408', + '429', + '5XX' + ])) + content_type = http_res.headers.get('Content-Type') + + res = operations.UploadTransferAttachmentResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) + + if http_res.status_code == 200: + pass + elif http_res.status_code in [401, 404, 429]: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[operations.ListTransfers409ApplicationJSON]) - res.list_transfers_409_application_json_object = out + out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorMessage]) + res.error_message = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res diff --git a/previous-versions/accounting/src/codataccounting/utils/utils.py b/previous-versions/accounting/src/codataccounting/utils/utils.py index 6b39ecf74..05eafba6c 100755 --- a/previous-versions/accounting/src/codataccounting/utils/utils.py +++ b/previous-versions/accounting/src/codataccounting/utils/utils.py @@ -5,6 +5,7 @@ import re from dataclasses import Field, dataclass, fields, is_dataclass, make_dataclass from datetime import date, datetime +from decimal import Decimal from email.message import Message from enum import Enum from typing import Any, Callable, Optional, Tuple, Union, get_args, get_origin @@ -112,7 +113,8 @@ def _parse_security_scheme_value(client: SecurityClient, scheme_metadata: dict, client.client.headers[header_name] = value elif scheme_type == 'http': if sub_type == 'bearer': - client.client.headers[header_name] = value.lower().startswith('bearer ') and value or f'Bearer {value}' + client.client.headers[header_name] = value.lower().startswith( + 'bearer ') and value or f'Bearer {value}' else: raise Exception('not supported') else: @@ -192,7 +194,7 @@ def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass f"{pp_key},{_val_to_string(param[pp_key])}") path = path.replace( '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1) - elif not isinstance(param, (str, int, float, complex, bool)): + elif not isinstance(param, (str, int, float, complex, bool, Decimal)): pp_vals: list[str] = [] param_fields: Tuple[Field, ...] = fields(param) for param_field in param_fields: @@ -235,7 +237,7 @@ def template_url(url_with_params: str, params: dict[str, str]) -> str: def get_query_params(clazz: type, query_params: dataclass, gbls: dict[str, dict[str, dict[str, Any]]] = None) -> dict[ - str, list[str]]: + str, list[str]]: params: dict[str, list[str]] = {} param_fields: Tuple[Field, ...] = fields(clazz) @@ -377,7 +379,7 @@ def _get_query_param_field_name(obj_field: Field) -> str: def _get_delimited_query_params(metadata: dict, field_name: str, obj: any, delimiter: str) -> dict[ - str, list[str]]: + str, list[str]]: return _populate_form(field_name, metadata.get("explode", True), obj, _get_query_param_field_name, delimiter) @@ -391,9 +393,9 @@ def _get_delimited_query_params(metadata: dict, field_name: str, obj: any, delim def serialize_request_body(request: dataclass, request_field_name: str, serialization_method: str) -> Tuple[ - str, any, any]: + str, any, any]: if request is None: - return None, None, None, None + return None, None, None if not is_dataclass(request) or not hasattr(request, request_field_name): return serialize_content_type(request_field_name, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], @@ -486,7 +488,7 @@ def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, def serialize_dict(original: dict, explode: bool, field_name, existing: Optional[dict[str, list[str]]]) -> dict[ - str, list[str]]: + str, list[str]]: if existing is None: existing = [] @@ -604,7 +606,8 @@ def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_f items.append(_val_to_string(value)) if len(items) > 0: - params[field_name] = [delimiter.join([str(item) for item in items])] + params[field_name] = [delimiter.join( + [str(item) for item in items])] else: params[field_name] = [_val_to_string(obj)] @@ -675,10 +678,14 @@ def _serialize_header(explode: bool, obj: any) -> str: def unmarshal_json(data, typ): - unmarhsal = make_dataclass('Unmarhsal', [('res', typ)], + unmarshal = make_dataclass('Unmarshal', [('res', typ)], bases=(DataClassJsonMixin,)) json_dict = json.loads(data) - out = unmarhsal.from_dict({"res": json_dict}) + try: + out = unmarshal.from_dict({"res": json_dict}) + except AttributeError as attr_err: + raise AttributeError( + f'unable to unmarshal {data} as {typ}') from attr_err return out.res @@ -731,6 +738,36 @@ def datefromisoformat(date_str: str): return dateutil.parser.parse(date_str).date() +def bigintencoder(optional: bool): + def bigintencode(val: int): + if optional and val is None: + return None + return str(val) + + return bigintencode + + +def bigintdecoder(val): + return int(val) + + +def decimalencoder(optional: bool, as_str: bool): + def decimalencode(val: Decimal): + if optional and val is None: + return None + + if as_str: + return str(val) + + return float(val) + + return decimalencode + + +def decimaldecoder(val): + return Decimal(str(val)) + + def get_field_name(name): def override(_, _field_name=name): return _field_name